Here is a sample program that will ask the user to give a value in radius and then the program will compute for the area of the circle. I wrote this sample program using Microsoft Visual Foxpro 5.0. I hope you will find my work useful. Thank you.
My email address are the following jakerpomperada@gmail.com and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Sample Program Output
Program Listing
Ok Button Command1 Click
set decimal to 2
SET FIXED ON
clear
radius = val(thisform.text1.value)
area = (3.1416 * radius * radius);
final_solve= round(area,2)
thisform.label4.caption = "The area of the circle is " + alltrim(thisform.text3.value)
thisform.text3.value = final_solve
Clear Button Command2 Click
thisform.text1.value=""
thisform.text3.value=""
thisform.text1.setfocus
thisform.label4.caption =""
Quit Button Command2 Click
Quit
No comments:
Post a Comment