Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace o
- {
- class Program
- {
- public static void Main(string[] args)
- {
- int[,] monTab2D = { { 1, 3, 5, 7 }, { 2, 4, 6, 8 }, { 3, 6, 9, 12 } };
- int compteur = 0;
- int nombremax = 0;
- for(int iLig = 0; iLig <3 ; iLig ++)
- {
- for(int iCol = 0; iCol <4 ; iCol ++, compteur++)
- {
- if (nombremax < monTab2D[iLig,iCol])
- {
- nombremax = monTab2D[iLig,iCol];
- }
- }
- }
- Console.WriteLine("Le plus grand des nombres du tableau est {0}",nombremax);
- Console.ReadKey();
- }
- }
- }
Add Comment
Please, Sign In to add comment