Write a function that takes three arguments: a character and two integers. The character is to be printed. The first integer specifies the number of times that the character is to be printed on a line, and the second integer specifies the number of lines that are to be printed. Write a program that makes use of this function.

Respuesta :

wyskoj

Written in Java:

private void writeLetters(char c, int a, int b) {

for(int i = 0; i < b; i++) {

for(int j = 0; j < a; j++) {

System.out.print(c);

}

System.out.print("\n");

}

}