Search This Blog

UI/UX Design | Web Development | Mobile Application Development

Whether you need UI/ UX design, web development services, or mobile app development services, Qaabil Digitals will be more than happy to help you. We work with top software developers, designers, and project managers. We tailor our services to suit your exact needs. We closely look at your company, listen to your story, and bring about the best ideas and solutions that can help you drive solid results. We don’t just produce work that works. We produce work that matters. Get a quote now Or Talk to us

Monday 27 June 2011

Java program using while loop


import java.util.*;
class loop
{
public static void main (String arg[])
{
Scanner in = new Scanner (System.in);
int a=10;
while (a<=20)
{
System.out.print ("\n\t a = "+a);
++a;
}

}
}

Remember, while a is less than or equal to 20 body of the loop will be executed. Once a equals to 21, loop will be broken and control goes to the next statement after that loop.

No comments:

Post a Comment

Share