Advertisement
Guest User

Untitled

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