I want to make a program that introduces a series of notes and once this in another part in a module that adds +1 for each suspended note and shows me the number of people who suspended, once all the notes are inserted.
He tells me only the last note and I do not know how to do it so that he takes into account the rest ...
static void Main (string [] args) { Notes(); }
static void Notas()
{
int[] notas = new int[10];
int incremento = 0;
int nota = 0;
while (incremento < 10)
{
Console.WriteLine("Ingresa un numero entre 0 i 10");
nota = Convert.ToInt32(Console.ReadLine());
if (nota < 0 || nota > 10)
Console.WriteLine("El numero no es un valor correcto");
else
notas[incremento] = nota;
incremento++;
}
Calculos(nota);
}
static void Calculos(int nota)
{
int suspe = 0;
if (nota < 5)
{
suspe++;
Console.WriteLine("Han suspendido {0}", suspe);
}
/*else if (nota <= 5)
{
if (nota == 5)
Console.WriteLine("suficientes son {0}");
else if (nota == 6 || nota == 7)
Console.WriteLine(" bien son {0}");
else if (nota == 8 || nota == 9)
Console.WriteLine(" notables son {0}");
else if (nota == 10)
Console.WriteLine(" execl·lentes son {0}");
}*/
}