I made all of the code below and learned everything in that code only in today's time, and didn't know any of it yesterday, am I doing better than most?
The code below works:
Code:
// My c++ Legend
/* Contains
all */
#include <iostream>
using namespace std;
int main()
{
cout << "Enter a number: ";
int x;
cin >> x;
cout << "You entered " << x << endl;
if (x > 10)
{
cout << x << " is greater than 10" << endl;
cout << x << " is a big number" << endl;
if (x > 20)
{
cout << x << " is greater than 20" << endl;
}
else
{
cout << x << " is less than 20" << endl;
}
}
else if (x < 10)
{
cout << x << " is less than 10" << endl;
}
else
{
cout << x << " is exactly 10" << endl;
}
return 0;
}