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 ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int i, max = 0, max1 = 0, maxall = 0;
- int num1, num2, num3;
- for (i = 1; i <= 3; i++)
- {
- Console.Write("Num1: ");
- num1 = int.Parse(Console.ReadLine());
- Console.Write("Num2: ");
- num2 = int.Parse(Console.ReadLine());
- Console.Write("Num3: ");
- num3 = int.Parse(Console.ReadLine());
- max = Math.Max(num1, num2);
- max1 = Math.Max(max, num3);
- Console.WriteLine("At group number " + i + " highest number was " + max1);
- if (max1 >= 0)
- {
- Console.WriteLine((int)Math.Sqrt(max1));
- }
- else
- {
- Console.WriteLine("No shoresh!");
- }
- maxall = Math.Max(max1, maxall);
- if (maxall == max1)
- {
- Console.WriteLine("Max number appeared in group number " + i);
- }
- }
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment