Ответы 1

  • using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication5{    class Program    {        static void Main(string[] args)        {            int m, n;            Console.WriteLine("Введите число m");            m = int.Parse(Console.ReadLine());            Console.WriteLine("Введите число m");            n = int.Parse(Console.ReadLine());            int[,] mass = new int[m, n];            int max = 0;            for (int i = 0; i < m; i++)            {                for (int j = 0; j < n; j++)                {                    Console.WriteLine("Введите (" + i + "; " + j + ")-ый элемент");                    mass[i, j] = int.Parse(Console.ReadLine());                    if (i == 0 && j == 0)                        max = mass[i, j];                    else                    {                        if (mass[i, j] > max)                            max = mass[i, j];                    }                }            }            Console.WriteLine("Maксимальный элемент равен " + max);            Console.ReadKey();        }    }}
    • Автор:

      gunnar
    • 6 лет назад
    • 0
  • Добавить свой ответ

Еще вопросы

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years