Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ForLesson15
- {
- class Program
- {
- static void Main ()
- {
- int [] args = new int [] { 1, 2, 3, 4, 5, 6 };
- Console.WriteLine (WriteNumbers(args));
- }
- static int WriteNumbers ( int [] i )
- {
- int maxValue = int.MinValue;
- foreach ( int j in i )
- {
- if ( j>maxValue )
- {
- maxValue = j;
- }
- }
- return maxValue;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment