New user to C++ on a Mac using xcode. Trying to use IDE correctly

First, I'm very new to programming and C++ so if I made a huge flaw in the code below, forgive me...it's possible I screwed up bigtime. I am trying to make a very, very basic program just so I can get started using xcode on my Mac instead of codeblocks on my pc to compile C++ programs

when I type in the 6 numbers ( as '1 2 3 4 5 6')and hit enter, the rest of the program does not run(the cout << a << b;). I tried running the program from bash also but that too was not working. I'm feeling really dumb right now. Can someone tell me what I'm doing wrong?

Who is Participating?

When the program prints "Enter 6 numbers: " you should enter 7 numbers since you have defined 7 int variables (a,b,c,d,e,f,g) in your code and the program expects to get 7 subsequent numbers from input not 6. so type e.g. '1 2 3 4 5 6 7' and you will get the output as:
'12' (one and two numbers without space if you need space between the two numbers you should change "cout << a << b;" line to "cout << a << " "<< b;"

0

Mark_CoAuthor Commented: 2012-09-07

Crap. I knew I was tired and made a stupid mistake. Sorry, and thank you

0

Mark_CoAuthor Commented: 2012-09-07

i apologize for this stupid question. I went back to xcode and got it fixed right away. Going to bed now, hahaha