Muhaiminur
2/12/2018 - 7:05 PM

Rectangle NUMBEr

Rectangle Sample input: 4 6 Sample output 123456 123456 123456 123456

Hint: 4 and 6 means 4 lines of numbers having 1..6 in each line.

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package BASICJAVA;

import java.util.Scanner;

/**
 *
 * @author ABIR
 */
public class Rectangle_Star {
    public static void main(String[]args){
        Scanner abir=new Scanner(System.in);
        System.out.println("Enter sample input");
        int x=abir.nextInt();
        System.out.println("Enter sample input");
        int y=abir.nextInt();
        System.out.println("sample output");
        int c=0;
        while(c<x){
          int d=0;
          while(d<y){
            System.out.print(d);
            d++;
          }
          System.out.println();
          c++;
        }
        System.out.println("=======================================================");
      }
}