Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   C (https://www.askmehelpdesk.com/forumdisplay.php?f=438)
-   -   Name of program (https://www.askmehelpdesk.com/showthread.php?t=320125)

  • Feb 21, 2009, 06:09 AM
    nofear13
    name of program
    we have an assignment!
    but hold up!
    I would only ask what is the name of this code if I have fill up the blanks!
    code:
    puclic class problim{
    public static void main(String[]arg){
    int x=___;
    int y=___;
    while;(__<s){
    x=____;
    y=____;
    system.out.print(_+_+_+_);
    x=_+_;
    }
    }
    }

    is it a while loop or do while? Or if-else? What ? If I had fill it up?.
    thanks for your time...
  • Feb 21, 2009, 06:18 AM
    nofear13

    output:
    11 34 59

    if you ever what to fill up the blnkz?=)
  • Feb 22, 2009, 01:46 PM
    Perito
    Quote:

    Originally Posted by nofear13 View Post

    while;(__<s){
    x=____;
    y=____;
    system.out.print(_+_+_+_);
    x=_+_;
    }

    It's a while loop - the condition is evaluated before the loop starts and at the beginning of every loop. The "while;" should read "while(" (eliminate the semicolon).
  • Feb 23, 2009, 01:32 AM
    nofear13

    OK thanks for the answer!=)

  • All times are GMT -7. The time now is 04:58 PM.