I have tried several different ways to make this programs work.
Error:
The program should display a n x m rectangle made of eights.
Be sure that you have displayed the correct number of rows.
The rows are correct though when I run the program.
Any advice?
package com.codegym.task.task04.task0436;
/*
Drawing a rectangle
*/
import java.util.Scanner;
public class Solution
{
static Scanner input = new Scanner(System.in);
public static void main(String[] args) throws Exception
{
//write your code here
int m = input.nextInt();;
int n = input.nextInt();;
for(int i = 0; i<m; i++)
{
for(int z = 0; z<n; z++)
{
System.out.print("8");
}
if(i<(m-1))
System.out.println();
}
}
}