View Single Post
Old 08-08-2007, 07:49 PM   #1 (permalink)
spinach-guy
Right Off the Assembly Line
 
Join Date: Jul 2007
Posts: 10
Default C++:Adding two numbers

We have just started C++ in college

Code:
#include <iostream>
using namespace std;
main()
{ int a,b,c;
  cout<<"Enter two nos.:";
  cin>> a >> b;
  c=a+b;
  cin.get();
  cout<<"Sum is"<<c<<"";
  cin.get();
  
}
but on compiling and running it{no errors here}nothing happens when i enter two nos. and press enter.Why is it so??can someone guide me??
spinach-guy is offline