Advertisement
StefanTobler

Lesson 24 Activity 1

Oct 27th, 2016
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1. /*
  2.  * Lesson 24 Coding Activity 1
  3.  * Use a for loop to print all of the numbers from 23 to 89, with 10 numbers on each line.
  4.  * Print one space between each number.
  5.  */
  6.  
  7. import java.util.Scanner;
  8. import java.lang.Math;
  9.  
  10. class Lesson_24_Activity_One {
  11.     public static void main(String[] args)
  12.      {
  13.  
  14.       for(int i = 23; i <= 89; i++)
  15.       {
  16.         if (i%10 == 3)
  17.         {
  18.           System.out.println();
  19.         }
  20.         System.out.print(i + " ");
  21.       }
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement