Paste Search Dynamic
Recent pastes
Avarage of three numbers
  1. using system;
  2.  
  3. public class Test
  4. {
  5.         public static void Main()
  6.         {
  7.                 int number1,number2,number3;
  8.                 float avarage;
  9.  
  10.             Console.Write("Enter 1st number :");
  11.             number1=Convert.ToInt32(Console.ReadLine());
  12.             Console.Write("Enter 2nd number :");
  13.             number2=Convert.ToInt32(Console.ReadLine());
  14.             Console.Write("Enter 3rd number :");
  15.             number3=Convert.ToInt32(Console.ReadLine());
  16.  
  17.             avarage=(number1+number2+number3)/3;
  18.  
  19.             Console.Write("Avarage of three numbers is {0}",avarage);
  20.  
  21.             Console.ReadLine();
  22.  
  23.         }
  24. }
Parsed in 0.003 seconds