Please i need to use something like this 5>x>2 so i would be able to print x something like that in the code below please HELP!! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Please i need to use something like this 5>x>2 so i would be able to print x something like that in the code below please HELP!!

#include <stdio.h> int main() { int score = ; /*insert ur scores up here awaiting an upgrade with scanf**/ if (score >= 70) //code by Abdulsalam Aramide printf("%s", "A \n"); else if ( score>=60 <70) /*i want to make 'B' 70 > score >= 60*/ printf("%s", "B \n"); else if ( score < 60 >= 50) printf("%s", "C \n"); else if ( score < 50 >= 45) printf("%s", "D \n"); else printf("%s", "F you carried the course \n"); /*GRADE DISTRIBUTION IN THE UNIVERSITY OF ILORIN*/ return 0; } //UNFINISHED THOUGH

20th Jun 2019, 8:22 AM
Haramide Damilola DATABEAM
Haramide Damilola DATABEAM - avatar
1 Answer
+ 2
Please don't tag a bunch of unrelated programming languages. 2 < x < 5 = x > 2 && x < 5. However you don't even need such conditions because when you reach the first "else if" you already know that the first condition failed and score is not >= 70. So you don't need to check again if score is < 70 and can just use else if(score >= 60).
20th Jun 2019, 9:00 AM
Anna
Anna - avatar