To accomplish this task, we need to create two loops and the 2nd loop is to be executed according to the first loop. The first loop is responsible for printing the line breaks whereas the second loop is responsible for printing the stars (*).
Algorithm:
- STEP 1: START
- STEP 2: DEFINE i,j
- STEP 3: SET n=7
- STEP 4: PRINT "Right Angle Triangle"
- STEP 5: SET i=1.REPEAT STEP 6 to 8 UNTIL i<n< li=""></n<>
- STEP 6: SET j = 1 .REPEAT STEP 7 UNTIL j<=i
- STEP 7: PRINT * and SET j=j+1
- STEP 8: PRINT new line and SET i=i+1
- STEP 9: END
Program:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer