...C++
#include <iostream>
using namespace std;
int main() {
char Name;
cout<<"Enter name ";
cin>>Name;
int Age;
cout<<"Enter age ";
cin>>Age;
bool Gender; //0 is female and 1 is male
cout<<"Enter Gender, {O for female, and any other number for male} ";
cin>>Gender;
bool Married;
cout<<"Is he/she married, {0 for unmarried and any other number for married} ";
cin>>Married;
}
我希望它打印一个语句,然后继续接受输入。接受输入后打印另一个语句,然后接受另一个输入。目前,它打印第一条语句,接受输入,然后一起打印其余语句。