Thread: While statements

  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    54

    While statements

    I started writing a program that uses a while loop to calculate sum, difference, difference between largest and smallest number inputted and i couldn't get it to work.
    I haven't figured out how to do sum and difference and i also made the program so that if the user inputs zero, then it will display all this information.

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Using my vast psychic powers, I have analyzed your source code and have typed up the solution. Now you can use your vast psychic powers to get the answer from me.

    Or if you want to take the lazy way out, you could actually read the forum rules, post your code attempt, any error messages you get, and exactly where you're stuck.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    lol! Yeah show us some code then we might be able to help you out
    Dev C++
    Win XP/2k/98

    I DO NOT TAKE CLASSES I DONT GET HOMEWORK THIS IS NOT A HOMEWORK QUESTION!!!

    He's lean he's keen... He's the spank machine!

  4. #4
    booyakasha
    Join Date
    Nov 2002
    Posts
    208

    Re: While statements

    Originally posted by sonict

    I haven't figured out how to do sum and difference
    That's an easy one, sum uses the + sign and difference uses the - sign.




    --post some code

  5. #5
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    Do you mean like order of operations or what? Eh?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unknown memory leak with linked lists...
    By RaDeuX in forum C Programming
    Replies: 6
    Last Post: 12-07-2008, 04:09 AM
  2. newbie question - if statements without conditions
    By c_h in forum C++ Programming
    Replies: 2
    Last Post: 07-18-2008, 10:42 AM
  3. C++ If Statements Help
    By moporho in forum C++ Programming
    Replies: 19
    Last Post: 01-18-2008, 08:40 AM
  4. Efficiency of case statements
    By Yasir_Malik in forum C Programming
    Replies: 26
    Last Post: 05-23-2006, 11:36 AM
  5. Need help with "if" statements
    By Harryt123 in forum C Programming
    Replies: 22
    Last Post: 05-14-2006, 08:18 AM