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 homework_2
- {
- class Program
- {
- static void Main(string[] args)
- {
- int num1;
- int num2;
- int num3;
- int num4;
- int sum;
- double avg;
- Console.WriteLine("Insert The First Number: ");
- num1 = int.Parse(Console.ReadLine());
- Console.WriteLine("Insert The Second Number:");
- num2 = int.Parse(Console.ReadLine());
- Console.WriteLine("Insert The Third Number: ");
- num3 = int.Parse(Console.ReadLine());
- Console.WriteLine("Insert The Fourth Number");
- num4 = int.Parse(Console.ReadLine());
- sum = num1 + num2 + num3 + num4;
- avg = sum / 4;
- Console.WriteLine("The Average Of The Four Numbers You Entered is :"+avg);
- Console.ReadLine();
- }
- }
- }
Add Comment
Please, Sign In to add comment