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;
- using System.Threading.Tasks;
- namespace Alex
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Enter number1");
- double num1 = double.Parse(Console.ReadLine());
- Console.WriteLine("Enter number2");
- double num2 = double.Parse(Console.ReadLine());
- Console.WriteLine("Enter number3");
- double num3 = double.Parse(Console.ReadLine());
- double average;
- if (num1 < num2 && num2 < num3)
- {
- average = num2;
- }
- else if (num2 < num1 && num1 < num3)
- {
- average = num1;
- }
- else
- {
- average = num3;
- }
- Console.WriteLine("You entered: " + num1 + ", " + num2 + " ΠΈ " + num3 + ". Average of them " + average + ".");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement