Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace AvarageOfThreeNumbers
- {
- class AvarageofIntegers
- {
- static void Main(string[] args)
- {/*3. Декларирайте три целочислени променливи и ги инициализирайте с начални стойности.
- * Отпечатайте средноаритметичната им стойност.*/
- int a, b, c;
- double avarage;
- //Console.WriteLine("Please insert three integer numbers: ");
- Console.Write("Please enter an integer number a= ");
- a = Int32.Parse(Console.ReadLine());
- Console.Write("Please enter an integer number b= ");
- b = Int32.Parse(Console.ReadLine());
- Console.Write("Please enter an integer number c= ");
- c = Int32.Parse(Console.ReadLine());
- avarage=(a+b+c)/3;
- Console.WriteLine(avarage);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment