)C++ Дан текст. Определите количество цифр в нем. 2)Вывести на экран числа в виде следующей таблицы:
41 42 ... 50
51 52 ... 60
61 62 ... 70
71 72 ... 80
C++
156
416
Ответы на вопрос:
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.; console.writeline("введите число m"); n = int.parse(console.; 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.; 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(); } } }
Популярно: Информатика
-
gopexar18.05.2022 14:36
-
SashaUshanka12.05.2022 01:23
-
Natusik0426.05.2023 23:48
-
gehdjtg22.12.2020 00:12
-
elenatsushko13.07.2021 00:16
-
cat252210.01.2021 12:20
-
Ласточка00518.08.2022 13:10
-
ataev051228.09.2021 10:37
-
FenniXDouble25.05.2023 09:59
-
рута206.07.2022 10:29