Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Task_3._3._4
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] numbers = { 12, 2, 7, 24, 5 };
- int max = numbers[0];
- for (int i = 0; i < numbers.Length; i++)
- {
- if (numbers[i] > max)
- {
- max = numbers[i];
- }
- }
- Console.WriteLine($"Max number in array {max}");
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment