Question #991

use a pair of nested while loops to output this:
$$$
$$$
$$$
$$$
$$$

Expert's answer

public class NestedLoopSampleCode
{
public static void main(String[] args)
{
for(int i = 1; i < =5; i++) { for(int j = 1; j < =3; j++)
System.out.print(“$“); System.out.println();
}
}}
LATEST TUTORIALS
APPROVED BY CLIENTS