Write an if statement that assigns 100 to x when y is equal to 0. Write an if/el
ID: 3689657 • Letter: W
Question
Write an if statement that assigns 100 to x when y is equal to 0. Write an if/else statement that assigns 0 to x when y is equal to 10. Otherwise it should assign 1 to x. Write an if/else statement that prints "Excellent" when score is 90 or higher, "Good" when score is between 80 and 89, and "Try Harder" when score is less than 80. Write an if statement that sets the variable hours to 10 when the flag variable minimum is set. Convert the following conditional expression into an if/else statement, q = (xExplanation / Answer
17.
if(y == 0){
x = 100;
}
18.
if(y == 10){
x = 0;
}
else{
x = 1;
}
19.
if(score >= 90){
printf("Excellent");
}
if(score >= 80 && score <= 89){
printf("Good");
}
if(score < 80){
printf("Try Harder");
}
20.
if(minimum){
hours = 10;
}
21.
if(x < y){
q = a + b;
}
else{
q = x * 2;
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.