+ 2

Write an if-else statement that output the word passed provided the value of the variable exam is greater than or equal to 60

1st Jul 2017, 12:34 PM
Aderibigbe Ebenezer Adewale
Aderibigbe Ebenezer Adewale - avatar
3 Respuestas
+ 2
language? Python: return "Passed" if exam >= 60 else "Failed" JavaScript: return (exam >= 60) ? "Passed" : "Failed"
1st Jul 2017, 1:50 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
0
if (exam>=60) { Console.WriteLine("Passsed"); } else { Console.WriteLine("Not passed"); }
1st Jul 2017, 1:46 PM
Peshkawt Mahmood
Peshkawt Mahmood - avatar
0
Write an if-else statement that outputs the word Passed provided the value of the variable exam is greater than or equal to 60 and also the value of the variable programsDone is greater than or equal to 10. Otherwise, the if-else statement outputs the word Failed. The variables exam and programsDone are both of type int.
1st Mar 2024, 7:08 AM
Nimona Kebede
Nimona Kebede - avatar