debug the code for displaying numbers 1 to 10 using dowhile loop.
Class doWhile
{
public static void main(String[] args)
{
int num =1;
do
{
System.out.println(num);
}while(num>=10)
}
}
public class doWhile{
public static void main(String[] args){
int num = 1;
do{
System.out.println(num);
num++;
} while(num<=10);
}
}
Comments
Leave a comment