stoyanoff

TheMostBoringLoop

Jun 16th, 2020
1,405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.28 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Test {
  4.     public static void main(String[] args) {
  5.         Scanner scan = new Scanner(System.in);
  6.  
  7.         for (int count=1; count <=10; count++) {
  8.             System.out.printf("The value of count is %d.\n", count);
  9.         }
  10.        
  11.         int x = 1;
  12.         do {
  13.             System.out.printf("The value of x=%d\n",x);
  14.             x++;
  15.  
  16.         } while (x <= 10);
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment