I'm a newbie to C# Programming and we're still starting on the loops. For our exercise today, we were tasked to create program using (while loop).
the question is : Read 5 marks from the user, print the sum and "Passed" if the marks greater or equal to 50 or if among the marks there is only one mark less than 50. if the user enters 2 marks less than 50 then the program should print STOP and end the program.
this is my try unfortunately not complete and I can't do it
May you help me, please ?
int sum=0 , counter = 0, number=0 ;
while (counter < 5 || number < 50)
{
number = Convert.ToInt16(Console.ReadLine());
sum = sum + number;
counter++;
}
Console.WriteLine(sum + "\nPassed");