Compute average of 3 numbers - c# program, DOT NET Programming

Compute Average of 3 numbers - C# Program

I didn't know the exact code for computing average of integer number. Can anybody suggest me the correct way for find out the average?

Posted Date: 2/11/2013 6:46:23 AM | Location : United States





Some new learner of C# faces this type of problem. Don''t worry use this code once.

Program - Compute average of 3 numbers

using System;  

class average

{

  public static void Main()

 {

   float a = 25;

   float b = 75;

   float c = 100;

   float avg = (a+b+c)/3;

  Console.WriteLine("The average of 25, 75 & 100 = " + avg);

  Console.ReadLine();

 }

}

Posted by Stephen | Posted Date: 2/11/2013 6:48:26 AM

The above code help me really. you select the right way for the above problem. Thank you so much.

Posted by | Posted Date: 2/11/2013 6:50:40 AM


Related Discussions:- Compute average of 3 numbers - c# program, Assignment Help, Ask Question on Compute average of 3 numbers - c# program, Get Answer, Expert's Help, Compute average of 3 numbers - c# program Discussions

Write discussion on Compute average of 3 numbers - c# program
Your posts are moderated
Related Questions
Name the two properties of the GridView control that have to be specified to turn on sorting and paging. The properties of the GridView control that require to be specified to

Question: (a) What is VB.NET 2005 and explain the versions of VB.NET. Name the four different types of applications that new version of VB.NET can create. (b) Using the

How can we connect to Microsoft Access, Foxpro , Oracle etc ? The Microsoft provides System.Data.OleDb namespace to communicate with the databases such as Oracle, scess  etc. I

What is XML Text Reader? The "XmlTextReader" class helps to give fast access to streams of XML data in a forward-only and read-only manner. The XMLTextReader also checks if the

Custom authentication: If we don't need ASP.NET to perform any authentication, we can set the authentication mode to none. The reason behind this decision could be: We don't

current available topics on computer graphics

What is difference between System.String and System.StringBuilder classes? String and StringBuilder classes are used to store string values but the dissimilarity in them is tha

What is DTD? The Document Type definition (DTD) defines how your XML should structure. For illustrate in the above XML we want to make it compulsory to provide "qty" and "total

How do you implement prototype pattern in .NET? The Cloning is achieved by using the ICloneable of the System namespace. It has a "Clone" method that actually returns the refer

Accepting a List of 5 Items - C# Program Hello, I've been trying so many codes for this but those codes didn't work well. Please write the code for Accepting a List of 5 Items