Advertisement
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;
- namespace ConsoleApplication4
- {
- class Program
- {
- static void Main(string[] args)
- {
- int[] array = new int[10];
- for (int i = 0; i < array.Length; i++)
- {
- //ellenőrzött bevitel
- do
- {
- Console.WriteLine("Kérem a " + (i + 1) + ". számot.");
- array[i] = int.Parse(Console.ReadLine());
- } while (array[i] > 0);
- }
- //kiírás:
- Console.WriteLine("A maximum: " + array.Max());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement