- #1
PainterGuy
- 940
- 70
hello everyone,
is there someone who can please tell me whether my algoritham and pseudocode is correct? i will be very grateful.
cheers.
Algorithm:
Step 1: Read the height “l” and radius “r” of cylinder
Step 2: If “l” and/or “r” are zero or less than zero. Go to Step 5
Step 3: Volume V = (3.142)*r*r*l
Step 4: Print V
Step 5: Enter valid values of “l” and “r”
Step 6: Stop
Pseudocode:
Read the height “l” and radius “r” of cylinder
IF the height “l” and radius “r” of cylinder are not zero or less than zero THEN
Volume V = (3.142)*r*r*l
ELSE
Enter valid values of “l” and “r”
ENDIF
Print V
Stop
is there someone who can please tell me whether my algoritham and pseudocode is correct? i will be very grateful.
cheers.
Algorithm:
Step 1: Read the height “l” and radius “r” of cylinder
Step 2: If “l” and/or “r” are zero or less than zero. Go to Step 5
Step 3: Volume V = (3.142)*r*r*l
Step 4: Print V
Step 5: Enter valid values of “l” and “r”
Step 6: Stop
Pseudocode:
Read the height “l” and radius “r” of cylinder
IF the height “l” and radius “r” of cylinder are not zero or less than zero THEN
Volume V = (3.142)*r*r*l
ELSE
Enter valid values of “l” and “r”
ENDIF
Print V
Stop