Q:

Write a Java program that reads a character c and an integer n, then prints a square of c with n as square length

0

Write a Java program that reads a character c and an integer n, then prints a square of c with n as square length. Name your class Square

Hint: To read a char c, use c=kb.next().charAt(0);

Sample Run:

Please enter a character: *

Please enter a number: 5

***** ***** ***** ***** *****

 

Sample Run:

Please enter a character: A

Please enter a number: 3

AAA AAA AAA 

All Answers

total answers (0)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now