0% found this document useful (0 votes)
8 views1 page

Calculate Average Grades in C#

This document contains a C# console application that calculates the average of user-inputted grades. The program prompts the user to enter grades, allows them to add more grades, and computes the average once the user decides to stop. Finally, it displays the calculated average to the user.

Uploaded by

Jc Ca
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views1 page

Calculate Average Grades in C#

This document contains a C# console application that calculates the average of user-inputted grades. The program prompts the user to enter grades, allows them to add more grades, and computes the average once the user decides to stop. Finally, it displays the calculated average to the user.

Uploaded by

Jc Ca
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

namespace ConsoleApplication5

{
class Program
{
static void Main()
{
float cal = 0, prom = 0, suma = 0, cantidad = 0;
int mas = 1;
[Link]("Ingresa La Primer Calificacion");
cal = [Link]([Link]());
suma = suma + cal;
for (cantidad = 1; mas == 1; cantidad++)
{

[Link]("Deseas Agregar Otra Calificacion?: 1=si 2=no");

mas =[Link]([Link]());
if (mas == 1)

{
[Link]("Introduce Tu Calificacion");
cal = [Link]([Link]());
suma = suma + cal;

}
else{
break;

}
}
prom = suma / cantidad;
[Link]("el promedio es:" + prom);
[Link]();

}
}
}

You might also like