class Alumnos{
static void Main(string [] args){
int CantRepro=0, CantApro=0, i=1;
double promGrupo=0, PromAproba=0, PromDesapro=0, nota=0;
string resp;
Console.WriteLine("Desea introducir datos? S/N");
resp = Console.ReadLine().ToLower();
while(resp == "s"){
Console.WriteLine("Ingrese la nota obtenida");
nota = Convert.ToDouble(Console.ReadLine());
if(nota <=5){
CantRepro++;
}
else if(nota >=6){
CantApro++;
}
promGrupo = nota /nota;
if(promGrupo>=6){
PromAproba++;
}
else if(promGrupo<=5){
PromDesapro++;
}
i++;
Console.Write("Desea Continuar S/N ");
resp = Console.ReadLine().ToLower();
}
Console.WriteLine("Cantidad de aprobados es:"+CantApro);
Console.WriteLine("Cantidad de reprobados es:"+CantRepro);
Console.WriteLine("El promedio grupal es de:"+promGrupo);
Console.WriteLine("El promedio aprobado es de:"+PromAproba);
Console.WriteLine("El promedio desaprobado es de:"+PromDesapro);
}
}
This is the statement: Calculate the following: a) How many failed. b) How many approved. c) The general average of the group. d) The average of grades passed and failed
Until now I have only been able to do the literals A and B but I do not know how to get the general average of the group and the average of approved and failed grades the rest I do not know if it's okay.