Thread: Please Help !

  1. #16
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Just a small nit but...
    Code:
    if (num>=1000000 || num <=9999)
        printf("Too big");
    So if the user enters "2" you're gonna tell them the number is too big?
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  2. #17
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    Quote Originally Posted by Obelisk View Post
    Thnx guys...for the help.. my mistake it seems the result didnt update itself

    instead of
    Code:
     number/10
    i had to do

    Code:
     number = number/10
    thanx agn
    Can also write this as:
    number /= 10;

Popular pages Recent additions subscribe to a feed