Computer Science, asked by bhardwajpratyaksha, 8 months ago

write a program in bluej to draw a triangle As given below without using scanner class
$
$$
$$$
$$$$
$$$$$
I bet u can't make it accurate ​

Answers

Answered by ravikantoct2004
1

USING NESTED FOR LOOPS

class ravi

{

public static void main()

{

for (int x = 1 ; x<=5 ; x++)

{

for (int y = 1 ; i <=x;i++)

{

System.out.print("$");

}

System.out.println();

}}}

Hehe my is accurate

Similar questions