Thread: Loops using while statement?????

  1. #1
    Registered User
    Join Date
    Jan 2002

    Angry Loops using while statement?????

    Help, I am trying to write a C program that uses the while and for statements. Also my output should generate a table with two columns. The program is supposed to classify each integer as eiter perfect, abundant, or deficient. I am supposed to use the % operator. I am having trouble, and running out of patience. Please help if you can. I would greatly appreciate it.
    Last edited by bearcat19; 01-28-2002 at 11:04 AM.

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    while loop:

    while(condition == true)
    do stuff

    executes until the condition isn't true anymore

    for loop:

    for(counter = 0; counter<stop; counter++)
    do stuff

    executes stop # of times - counter's incremented on every pass.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Usefulness of the "else if" statement
    By gn17 in forum C Programming
    Replies: 7
    Last Post: 08-12-2007, 05:19 AM
  2. syntax question
    By cyph1e in forum C Programming
    Replies: 19
    Last Post: 03-31-2006, 12:59 AM
  3. If Else statement problem
    By doofusboy in forum C Programming
    Replies: 2
    Last Post: 11-09-2005, 07:18 AM
  4. loops in a main statement....
    By xero18 in forum C Programming
    Replies: 8
    Last Post: 10-30-2005, 09:36 PM
  5. Uh-oh! I am having a major switch problem!
    By goodn in forum C Programming
    Replies: 4
    Last Post: 11-01-2001, 04:49 PM