Q:

write java program to print the sentence welcome to java 5 times, using while loop and draw flowchart diagram

0

write java code to print the sentence "welcome to java  5 times" using while loop and draw flowchart diagram

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

/********
write java program to print the sentence welcome to java  5 times, using while loop
********/
public class Main
{
	public static void main(String[] args) {
		int i=1;
while(i<=5)
{
System.out.println("welcome to java");
i++;
}	    
	}
}

 

output:

welcome to java
welcome to java
welcome to java
welcome to java
welcome to java

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now