Qbasic Program To Find The Area Of Circle
Algorithm To Find The Area of Circle
Step1: Start
Step2: Accept/Input radius of the circle and store it in the variable r
Step3: Calculate area = (22/7)*r^2
Step4: Display the area of the circle
Step5: End the program
Step1: Start
Step2: Accept/Input radius of the circle and store it in the variable r
Step3: Calculate area = (22/7)*r^2
Step4: Display the area of the circle
Step5: End the program
Qbasic Program To Find The Area Of Circle
CLS
INPUT “Enter radius”; R
A= (22/7) * R^2
PRINT “The area of circle=”; A
END
INPUT “Enter radius”; R
A= (22/7) * R^2
PRINT “The area of circle=”; A
END
Algorithm To Find The Area of Circle Using Sub Procedure in QBASIC
Step1: Start
Step2: Declare the sub procedure with a name and parameters as Area (r)
Step3: Accept/Input radius of the circle and store it in the variable r
Step4: Call the sub procedure declared in the step2 with CALL statement as CALL Area (r)
Step5: End the program
Step6: Define the sub procedure
Step7: In the sub procedure, calculate the area of the circle
Step8: Display the area of the circle
Step9: End the sub procedure
Step1: Start
Step2: Declare the sub procedure with a name and parameters as Area (r)
Step3: Accept/Input radius of the circle and store it in the variable r
Step4: Call the sub procedure declared in the step2 with CALL statement as CALL Area (r)
Step5: End the program
Step6: Define the sub procedure
Step7: In the sub procedure, calculate the area of the circle
Step8: Display the area of the circle
Step9: End the sub procedure
Qbasic Program To Find The Area Of Circle Using SUB procedure
DECLARE SUB AREA(R)
CLS
INPUT “Enter radius”; R
CALL AREA(R)
END
SUB AREA(R)
A= (22/7) * R^2
PRINT “The area of circle=”; A
END SUB
CLS
INPUT “Enter radius”; R
CALL AREA(R)
END
SUB AREA(R)
A= (22/7) * R^2
PRINT “The area of circle=”; A
END SUB
Algorithm To Find The Area of Circle Using Function Procedure in QBASIC
Step1: Start
Step2: Declare the function procedure with name and parameters as Area (r)
Step3: Accept/Input radius of the circle and store it in the variable r
Step4: Call the function procedure declared in the step2 with a variable or PRINT Statement
Step5: End the program
Step6: Define the function procedure
Step7: In the function procedure, calculate the area of the circle
Step8: Assign the value of the area to the function name
Step9: End the function procedure
Step1: Start
Step2: Declare the function procedure with name and parameters as Area (r)
Step3: Accept/Input radius of the circle and store it in the variable r
Step4: Call the function procedure declared in the step2 with a variable or PRINT Statement
Step5: End the program
Step6: Define the function procedure
Step7: In the function procedure, calculate the area of the circle
Step8: Assign the value of the area to the function name
Step9: End the function procedure
Qbasic Program To Find The Area Of Circle Using FUNCTION procedure
DECLARE FUNCTION AREA(R)
CLS
INPUT “Enter radius”; R
PRINT"The area of a circle is "; AREA(R)
END
FUNCTION AREA(R)
A= (22/7) * R^2
AREA=A
END FUNCTION
INPUT “Enter radius”; R
PRINT"The area of a circle is "; AREA(R)
END
FUNCTION AREA(R)
A= (22/7) * R^2
AREA=A
END FUNCTION
Comments
Post a Comment