Huh.. that is weird. Although I've noticed something just now. When I paste my code in the "Quick Reply" and click "Go Advanced" (in order to preview) it makes my spacebars disappear for some reason (As is the reason why "elseif" shows together.)
Also how are there any duplicates? All the couts have a purpose. It might seem that "Your both crazy old" is repeated but that's only so that if they are the same age, it adds "And" to the previous sentence, "Your both the same age". (Sorry if it's obvious and I don't see it.. Still a noob.. -_-)
As for my IDE I'm using Xcode. Will now try and paste code from a online converter. (I don't think macs have notepad and text edit still uses font.)
Code:
#include <iostream>
#include <string>
using namespace std;
int main ()
{
string name; // x
string name_2; // y
int x;
int y;
cout << "Hello User.. This program intend's to ask for the age and name of 2 people\n";
cout << "Please enter the first name:\n";
getline(cin, name, '\n');
cout << "Good.. now enter the age of " << name << ":\n";
cin >> x;
cin.ignore();
cout << "Next I need you to enter the name of person number 2:\n";
getline(cin, name_2, '\n');
cout << "Alright.. now finally please enter the age of " << name_2 << ":\n";
cin >> y;
if (x > y)
cout << name << " is older than " << name_2 << "\n";
else if (y > x)
cout << name_2 << " is older than " << name << "\n";
else if (x == y)
cout << "You're both the same age!!\n";
if (( x > 100 && y > 100) && x == y)
cout << "And You're both crazy old!!\n";
else if ( x > 100 && y > 100)
cout << "You're both crazy old!!!\n";
}