Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- // Kirjoita ohjelmasi tähän alle
- Scanner lukija = new Scanner(System.in);
- System.out.println("Leveys: ");
- int leveys = Integer.parseInt(lukija.nextLine());
- System.out.println("Korkeus: ");
- int korkeus = Integer.parseInt(lukija.nextLine());
- int leveysx = 1;
- int korkeusx = 1;
- while (leveysx <= leveys) {
- System.out.print("x");
- leveysx++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement