p.s. Thank you very much for any and all ideas they are greatly appreciated

Moderator: Coders of Rage
Dear god, they actually ported ES to a piece of celery!MarauderIIC wrote:You know those people that are like "CHECK IT OUT I just made Linux run on this piece of celery [or other random object]!!"? Yeah, that's Falco, but with ES.
Martin Golding wrote: "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
Code: Select all
//This gives you good advice
#include <iostream>
using namespace std;
unsigned short int grade;
int main()
{
cout << "Enter your grade!";
cin >> grade;
//I don't like switch statements :p
if( grade > 100 )
cout << "Lying gets you nowhere";
else if( grade >= 90 && grade <= 100 )
cout << "You're better than me";
else if( grade >= 80 && grade < 90 )
cout << "What does the B stand for?";
else if( grade >= 70 && grade < 80 )
cout << "It means average, believe it or not";
else if( grade >= 60 && grade < 70 )
cout << "Remember, it's your teacher's fault.";
else if( grade >= 50 && grade < 60 )
cout << "It stands for fantastic. Srsly.";
else
cout << "Stop drinking on school nights.";
cin.get();
return 0;
}
Code: Select all
#include <iostream>
#include <stdlib.h>
#include <string>
#include <math.h>
using namespace std;
int main(int argc, char *argv[])
{
cout << "what would you like your name to be?" << endl;
string name;
cin >> name;
cout << "hello nice to meet you " << name << endl;
system ("PAUSE");
cout << "what is your favorite number " << name << endl;
int x;
cin >> x;
cout << "Your favorite number is " << x << endl;
system ("PAUSE");
return 0;
}
Please do not get into the habit of using "system("PAUSE");" in your program to wait for a keystroke.killercoder wrote:This is what I have made so far
Code: Select all
#include <iostream> #include <stdlib.h> #include <string> #include <math.h> using namespace std; int main(int argc, char *argv[]) { cout << "what would you like your name to be?" << endl; string name; cin >> name; cout << "hello nice to meet you " << name << endl; system ("PAUSE"); cout << "what is your favorite number " << name << endl; int x; cin >> x; cout << "Your favorite number is " << x << endl; system ("PAUSE"); return 0; }
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Also, not sure why you're including math.h, you only need this for functions like sqrt(), sin(), etc.killercoder wrote:Ohh thank you very much for the advice ill break that bad habit
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
Code: Select all
#include <iostream>
#include <stdlib.h>
#include <string>
#include <conio.h>
using namespace std;
int main(int argc, char *argv[])
{
int x;
int c = x + 5;
string name;
int answer1;
cout << "what would you like your name to be?" << endl;
cout << ">"; cin >> name;
cout << "hello nice to meet you " << name << endl;
system ("PAUSE");
cout << "what is your favorite number " << name << endl;
cout << ">"; cin >> x;
cout << "Your favorite number is " << x << endl;
system ("PAUSE");
cout << "what is your favourite number +5?" << endl;
cout << ">"; cin >> c;
if( c != x+5 )
cout << "Wrong@@@@" << endl;
else if( c = x+5 )
cout << "Correct!!" << endl;
}