Friday, September 1, 2023

Who are you?

 #include <iostream>

#include <string.h>

using namespace std;

int main() {

    string person;

    cout << "Who are you? ";

    cin >> person;

    if (person=="professor") cout << "Professor has to teach"; 

    else if (person=="student") cout << "Student has to learn";

    else cout << "I don't know what the " <<person<<" has to do";

return 0;

}

No comments:

Post a Comment

NaCl.xyz Generator with Interactive 3D Visualization

NaCl.xyz Generator with Interactive 3D Visualization NaCl.xyz Generator with Interactive 3D Visualization ...