- 1

Hello how can I do this in c++

First I need input from the user if he is natura or social student then gender then mark after that if he's natural and male above 380 mark out of 700 passed for natural female above 360 passed else failed for social male above 350 passed and social female above 330 passed else failed

17th May 2021, 5:14 PM
Abel Merid
Abel Merid - avatar
6 Answers
+ 2
//Like this? #include <iostream> using namespace std; int main() { char G[10], o[5]; int x; cout<< " Enter your stream : "; cin>> o; cout<<o; cout<< "\n Enter your gender : "; cin>> G; cout<<G; cout<< "\n Enter your mark : "; cin>> x; cout<<x<<endl; if ((x>700) || (x<0)) cout<<"invalid\n"; else if ((x>=380) || (x>=360)) cout<<"passed\n"; else if ((x>=350) || (x>=330)) cout<<"passed\n"; else cout<<"failed\n"; return 0; }
17th May 2021, 6:09 PM
Aditya
Aditya - avatar
+ 2
Where's the problem?
17th May 2021, 5:58 PM
Aditya
Aditya - avatar
+ 2
I didn't know how to include gender mark and stream in the code
17th May 2021, 5:59 PM
Abel Merid
Abel Merid - avatar
+ 1
any code you have written so far ?
17th May 2021, 5:23 PM
Abhay
Abhay - avatar
0
#include <iostream> using namespace std; int main() { char G, o; int x; cout<< " enter your stream\n"; cin>> o; cout<< " enter your gender\n"; cin>> G; cout<< " enter your mark\n"; cin>> x; if ((x>700) || (x<0)) cout<<"invalid\n"; else if ((x>=380) || (x>=360)) cout<<"passed\n"; else if ((x>=350) || (x>=330)) cout<<"passed\n"; else cout<<"failed\n"; return 0; }
17th May 2021, 5:51 PM
Abel Merid
Abel Merid - avatar
0
Yes☝
17th May 2021, 5:52 PM
Abel Merid
Abel Merid - avatar