+ 1
If i want to take input from user and according to that i want to show that person is fail or pass then what i have to do.
include <iostream> using namespace std; int main() { int mark = 90; if (mark < 50) { cout << "You failed." << endl; } else { cout << "You passed." << endl; } return 0; }
1 Odpowiedź
+ 2
https://code.sololearn.com/cqYQc588Gl0Q/#cpp
#include <iostream>
using namespace std;
int main()
{
int mark;
cout << "Please enter grade: \n";
cin >> mark;
if (mark < 50) {
cout << "You failed." << endl;
}
else {
cout << "You passed." << endl;
}
return 0;
}