Findryan

Untitled

Nov 8th, 2016
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class For
  4. {
  5. public static void main(String[]yayan)
  6. {
  7. Scanner input = new Scanner(System.in);
  8. System.out.println("Masukan bilangan");
  9. int n = input.nextInt();
  10. int m,i ;
  11. for(i=0;i<=n;i++)
  12. {
  13. m = i*i;
  14. System.out.println(i+"*"+i+" = "+m);
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment