Here is a sample program that will ask the user to give a length of the side of the square and then the program will compute for the area of the square. 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
side = val(thisform.text1.value)
area_square = (side * side);
final_solve= round(area_square,2)
thisform.label4.caption = "The area of the square 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