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; }

29th Oct 2023, 12:31 PM
Haram Abbas
Haram Abbas - avatar
2 odpowiedzi
+ 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
29th Oct 2023, 1:03 PM
Darpan kesharwani🇮🇳[Inactive📚]
Darpan kesharwani🇮🇳[Inactive📚] - avatar
+ 1
you forgot the Semi-Colums and tried to get Input of an string
29th Oct 2023, 9:37 PM
D1M3
D1M3 - avatar