Constructive criticism

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Tell me what do you think? How could i improve on it? constructive criticism is welcome





#include <iostream>

using namespace std;

int main()
{
    string hey;
    string wyd;
    string response;
    string day;
    string why;
    string ok;
    string name;
    string sex;
    string info;
    int age;
    cout << "Are you a boy or girl?" << endl;
    cin >> sex;
    if(sex=="girl"){
        cout << "Periods are such a pain" << endl;
    }
    else {cout<< "It's nice not having periods isnt it?" << endl;
    }
    cout << "How old are you?" << endl;
    cin >> age;
    if (age < 50) {
        cout << "Youre young" << endl;
    }
    else {
        cout << "Youre old" << endl;
    }
    cout << "So whats your name?" << endl;
    cin >> name;
    cout << "thats a nice name" << endl;
    cout << "So wyd?" << endl;
    cin >> wyd;
    cout << "Oh thats cool. i'm just talking to you being bored" << endl;
    cin >> response;
    cout << "So how is your day?" << endl;
    cin >> day;
    cout << "Why is that? My day is good" << endl;
    cin >> why;
    cout << "tell me about yourself. I wanna get to know " << name << endl;
    cin >> info;
    return 0;
}
Last edited on
Tell me what do you think? How could i improve on it?

Start by editing your post to add code tags around your code.
Last edited on
ok
Last edited on
closed account (48T7M4Gy)
Tell me what do you think?

It's rubbish.

How could i improve on it?

Trashing it.

constructive criticism is welcome

See above.
I think you should include <string> because you are using the std::string class.
Last edited on
1: sex is what you do, gender is who you are.
2: Use string vectors for input and prompting.
3: cin is incorrect for most entries, getline is what should be used.

You might think kemort's answer is harsh, but really, what you are asking is "I'm doing absolutely nothing", how well am I doing. Well, so long as you don't move or blink your eyes, you'd be doing pretty good.

Qualified opinions are usually predicated upon understanding the objective.
Topic archived. No new replies allowed.