Hello first program need a hint :)

HELLO! I'm really excited to start programming --I've just started my first college semester as a Computer Science major, and our first assignment is as follows !PLEASE! dont give me the answer just a hint I really want to figure it out on my own if possible!!
Here is what I have so far!


// Homework Assignment 1 June 2nd, 2011
#include "stdafx.h"

#include <iostream>

using namespace std;

int main ()
{
a = 1 ;
b = 2 ;
c = 3 ;
cout << a << endl ; \\ Show A !
cout << b << endl ; \\ Show B !
cout << c << endl ; \\ Show C !
cin.get () ; \\ Key+Enter to Exit!
return 0 ;
}

My homework was to get a text box to appear and show each on a different line. Thanks in advance for your help!!
1
2
3
a = 1 ;
b = 2 ;
c = 3 ;

Those 3 are wrong. The solution is really simple but u didnt want it ^^.
I figured it out thank you!!!!!!!!! :-] ( after 5 cups of coffee and a headache :D)

#include "stdafx.h"

#include <iostream>

using namespace std;

int main ()

{
int a ;
int b ;
int c ;
a = 1 ;
b = 2 ;
c = 3 ;
cout << a << endl;
cout << b << endl;
cout << c << endl;
cout << "Hello World!";
cin.get () ;
return 0;
}


Last edited on
Topic archived. No new replies allowed.