Thread: Program failure

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    16

    Program failure

    I have tried to make a program but it fails when compiled and run. Could someone check it out and tell me what's wrong.

    Code:
    #include <iostream>
    
    using namespace std;
    
    int main()
    {
      int thisisanumber;
    
      cin>> thisisanumber;
      cin.ingnore();
      if ( thisisanumber > 5 ) {
     cout<<"hi"; 
    } 
      
     
      
    
      cin.get();
      return 0;
    }
    My intention is to enter any number which is over 5 so i get the message hi..
    Last edited by cnoob; 01-14-2005 at 12:40 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help with a program, theres something in it for you
    By engstudent363 in forum C Programming
    Replies: 1
    Last Post: 02-29-2008, 01:41 PM
  2. Replies: 4
    Last Post: 02-21-2008, 10:39 AM
  3. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM