Advertisement
LePetitGlacon

FICHE 6 Exercice 4

Nov 12th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | None | 0 0
  1. using System;
  2.  
  3. namespace o
  4. {
  5.     class Program
  6.     {
  7.         public static void Main(string[] args)
  8.         {
  9.            
  10.           int[] tab10Valeurs = {25, 14, 50, 51,15, 14,13,12,18,18,138};
  11.           int variableReference = tab10Valeurs[0];
  12.            
  13.          
  14.          
  15.           for (int i = 0;i < tab10Valeurs.Length;i++) {
  16.          
  17.             if (variableReference < tab10Valeurs[i]){
  18.                 variableReference = tab10Valeurs[i];
  19.             }
  20.           }
  21.           Console.WriteLine(variableReference);
  22.                
  23.             Console.ReadKey();
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement