how do you write a C# console application program that asks for three numbers and prints the average value?
1
Expert's answer
2013-08-15T07:37:20-0400
using System; using System.Collections.Generic; using System.Linq; using System.Text;
namespace three_numbers_and_prints_the_average_value { class Program { static void Main(string[] args) {
double sum = 0;//variable for sum of three number for(int i=0;i<3;i++){ Console.Write("Enter number # " + (i + 1).ToString()+": "); sum += double.Parse(Console.ReadLine());//read number } Console.Write("The average value is: "+(sum/3).ToString());//show result Console.ReadLine();//delay
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments
Leave a comment