Felanpro

uppgift83

Nov 19th, 2020
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package skola;
  7. import java.util.Scanner;
  8. /**
  9. *
  10. * @author Felix 1
  11. */
  12. public class Uppgift83 {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) {
  18. Scanner inmatning = new Scanner(System.in);
  19. System.out.print("Antalet rader: ");
  20. int rader = inmatning.nextInt();
  21.  
  22. System.out.print("Antalet kolumner: ");
  23. int kolumner = inmatning.nextInt();
  24.  
  25. for(int i = 0; i < rader; i++)
  26. {
  27. for(int x = 0; x < kolumner; x++)
  28. {
  29. System.out.print("*");
  30. }
  31. System.out.println("");
  32. }
  33. }
  34.  
  35. }
  36.  
Add Comment
Please, Sign In to add comment