+ 1
solve this please
#include<stdio.h> int main(){ int marks; printf("enter marks:"); scanf("%d",&marks); if(marks>80){ printf("good");} if(40<=mark<80){ printf("medium"); } if(40>marks){ printf("poor"); }}
9 Answers
+ 8
Solve it?
+ 6
This is how I would do it:
https://code.sololearn.com/c4LMt80pRpEY/?ref=app
+ 4
Nice sol
+ 2
if(marks>=40 && marks<80){
printf("medium");
else
printf("poor");
+ 2
tnx all
+ 1
yeah
+ 1
its not working... I need to solve this
+ 1
where did u tried this code?
+ 1
#include<stdio.h>
void main(){ // int has return at end
int marks;
printf("enter marks");
scanf("%d",&marks);
if(marks>80)
printf("good");
else if((marks<=80)&&(marks>=40));
printf("medium");
else if((marks>=0)&&(marks<40));
printf("poor");
}