Monday, October 19, 2009

helloworld.C

#include <iostream>

using namespace std;

int main()
{
  int thisisanumber;
  cout<<"\ncompiled with this command:\ng++ -g helloworld.C -o helloworld\n\n";
  cout<<"Please enter a number: ";
  cin>> thisisanumber;
  cin.ignore();
  cout<<"You entered: "<< thisisanumber <<"\n";
  cin.get();
}

No comments: