if statement


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: if statement

  1. #1
    mike Guest

    if statement


    With the following if statement:
    if (a==b)
    {
    x=10
    }
    else
    {
    if (c==d)
    {
    x=55
    }
    else
    {
    x=100
    };
    };
    what is the value of x under the following condition?
    a=5, b=1, c=100, d=50
    a=5, b=10, c=o, d=4
    a=0, b=100, c=5, d=0

    hope someone can help

  2. #2
    Nikolaj B.N Guest

    Re: if statement


    Schoolwork !!!!!
    Learn to think!!

  3. #3
    mike Guest

    Re: if statement


    "Nikolaj B.N" <nb@itplus.dk> wrote:
    >
    >Schoolwork !!!!!
    >Learn to think!!


    I am trying to learn on my own. Trying to learn some programing

  4. #4
    Paul Clapham Guest

    Re: if statement

    I find the easiest way to learn how programming language constructs work is
    to try them. Get yourself a copy of the Java SDK, install it, and run it
    yourself.

    mike <mike@ca.freei.net> wrote in message news:38db13b0$1@news.devx.com...
    >
    > "Nikolaj B.N" <nb@itplus.dk> wrote:
    > >
    > >Schoolwork !!!!!
    > >Learn to think!!

    >
    > I am trying to learn on my own. Trying to learn some programing




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center