0
Still giving error
#include <iostream> using namespace std; int main() { int marks; cin>>"marks"; if (marks>=50) { cout<<"add 10 percent"; } else { cout<<"fail" } return 0; }
3 ответов
+ 9
Haram Abbas ,
Little mistake in your code...
1: Remove ` " " `from cin >> "marks";
2: semicolon is missing in end of `fail`.
See this modified version..
https://code.sololearn.com/cdGw08rAa62h/?ref=app
+ 1
you forgot the Semi-Colums and tried to get Input of an string
+ 1
on line 6 : you makes marks variable into a string which cause error , cin function can't take input on a string word , you have to create variable to stored inputs
on line 13 use semicolon after cout<<"failed"
Solution :-
× -> cin>>"marks";
√ -> cin>>marks;