7th Sep 2017, 10:49 AM
Mr.Perfect
Mr.Perfect - avatar
7 Réponses
7th Sep 2017, 10:58 AM
Nithiwat
Nithiwat - avatar
+ 4
#include <iostream> using namespace std; int main() { int b; int a=35; cout <<"enter your marks:"<<endl; cin >> b; if (b>=a) {cout <<"congrats:"<<endl; cout <<"you are pass:"<<endl; } else if (b<a){ cout <<"sorry:"<<endl; cout <<"you are Fail:"<<endl; } return 0; }
7th Sep 2017, 10:53 AM
Paul
+ 3
here you go. you can make else if() ststements like thst. also do not forget about SEMICOLONS!!!
7th Sep 2017, 10:53 AM
Paul
+ 2
thanks paul and nithiwat
7th Sep 2017, 11:00 AM
Mr.Perfect
Mr.Perfect - avatar
0
#include <iostream> using namespace std; int main() { int a, b; a=35 cout <<"enter your marks:"<<endl; cin >> b; if (b>=a){ cout <<"congrats:"<<endl; cout <<"your are Pass:"<<endl; } else if (b<a){ cout <<"sorry:"<<endl; cout <<"you are Fail:"endl; } return 0; }
7th Sep 2017, 11:43 AM
Mr.Perfect
Mr.Perfect - avatar
0
hi my name is Ayo but I am using my mum's email AC to log in but I took permission before doing so.
7th Sep 2017, 2:08 PM
Esther Fadumiye
Esther Fadumiye - avatar
0
I'm a boy. so you are correct but let me go through it
7th Sep 2017, 2:09 PM
Esther Fadumiye
Esther Fadumiye - avatar