Anyone interested in helping me out again??

This is a discussion on Anyone interested in helping me out again?? within the C++ Programming forums, part of the General Programming Boards category; Mmm, yeah. It's a good way to look even less like you know what you're doing... might want to get ...

  1. #16
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,074
    Mmm, yeah. It's a good way to look even less like you know what you're doing... might want to get a book.


    Keep in mind, I'm in work waiting on reports, so this is my mean time. I'm much more friendly in my home hours.
    Sent from my iPadģ

  2. #17
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    They actually tend to report stuff to college professors. .
    Do you speak from experience? . . .

    Code:
    while (toupper(quit[0]) != n || toupper(quit[0]) == y);
    Perhaps you meant 'y' instead of y, and 'n' instead of 'n'? Besides, that logic is messed up.
    Code:
    while the letter is not n or the letter is y
    The second test is redundant . . .

    You're still including conio.h, which is non-standard.

    [edit]
    Code:
    cout << "It will take you" << numpayment_period << "months to pay of your mortgage." <<endl;
    The output tends to be prettier if you print spaces around numbers. As written, the user will see something like
    Code:
    It will take you12months to pay of your mortgage.
    Also, the red of should be off.

    Code:
            cout << "Enter Y to continue, N to quit>";
            cin >> quit;
    
    	return 0;
    }
    Looks to me like you can enter anything and the program will still quit . . . [/edit]
    Last edited by dwks; 10-03-2007 at 01:34 PM.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #18
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Comparing lower-case letters to the result of toupper is almost certain to always be false, since toupper converts the letter to upper-case.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #19
    Deathray Engineer MacGyver's Avatar
    Join Date
    Mar 2007
    Posts
    3,211
    Quote Originally Posted by matsp View Post
    Comparing lower-case letters to the result of toupper is almost certain to always be false, since toupper converts the letter to upper-case.

    --
    Mats
    lol..... nice.

  5. #20
    Cryptanalyst
    Join Date
    Sep 2007
    Posts
    52
    Quote Originally Posted by SlyMaelstrom View Post
    Mmm, yeah. It's a good way to look even less like you know what you're doing... might want to get a book.


    Keep in mind, I'm in work waiting on reports, so this is my mean time. I'm much more friendly in my home hours.
    lol.
    And yes mat,toupper indeed does do that..I looked it up in my reference. Goddamn,I've forgotten all my basics...

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Anyone interested?
    By JarJarBinks in forum Projects and Job Recruitment
    Replies: 7
    Last Post: 09-17-2004, 05:59 AM
  2. for beginner's or anyone interested
    By Iconoklast in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 03-25-2004, 01:45 PM
  3. War with Iraq - Read this article if you're interested
    By Davros in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 01-25-2003, 11:10 PM
  4. Who here would be interested...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 07-19-2002, 08:10 PM
  5. interested in helping????
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 05-05-2002, 09:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21