+ 1
Where is the mistake... Because this doesn't work can you help me.
#include <iostream> using namespace std; int main() { int num,c; cin >> num; cin >> c; int a =(num/c)*100 ; if(a>100){cout <<"lower num. please";} if(a>90 && a<100){cout <<"5";} if(a>75 && a<90){cout <<"4";} if(a>65 && a<75){cout <<"3";} if(a<65 && a>0){cout <<"not passed ";} cout << a <<num <<c ; return 0; }
6 Réponses
+ 4
if you are running this in the code playground you need to give all inputs at once seperated by new line:
40
62
"Submit"
+ 3
missing } to close main function
unless you just missed that when pasting here xD
0
how do you know that
0
i mean... that i miss } when i was pasting it
0
Take out the please unless you want to cout the please
0
Your if statements miss the numbers 100, 90, 75, and 65. One line says
a > 90 and the one below says a < 90. Where does 90 go? Nowhere.
You should include 90 in one of the groups. Maybe a>= 90 or a <= 90 (NOT BOTH). Do the same for 100, 75, and 65.