0
What's problem in this program?
#include <iostream> using namespace std; int main() { int marks; if (marks>=50); { cout<<"add 10 percent"; } else { cout<<"fail"; } return 0; }
2 odpowiedzi
+ 2
Did you take input? marks
and semicolon should not be after if block
+ 1
on line 6 : you used a semicolon which cause error , cuz in if/else statement we use '{}' not ';'