Advertisement
Guest User

Untitled

a guest
Feb 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. /*
  2. * @Description: Number Relations
  3. * @Author: Anuj Radia
  4. * @Since February 21st
  5. *
  6. */
  7. public class Repetition_Part2_1
  8. {
  9. public static void main(String[] args)
  10. {
  11.  
  12. long integer=1; //Declaring and Initializing Variables
  13. int i=1,j=10,k=0,l=18; //Declaring and Initializing Variables
  14.  
  15. for(i=1;i<=9;i++)
  16. {
  17. for(k=1;k<l;k++)
  18. {
  19. System.out.print(" "); // Adding Spaces to form a specific shape
  20. }
  21. System.out.println(" "+ integer +"x" + integer + "=" + (integer*integer) +"");
  22. integer=integer+j; //Modifying Variables
  23. j=j*10;
  24. l=l-2;
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement