Sunday, November 13, 2016

Basic Math Operations in Foxpro

In this program it will ask the user to give two numbers and then our Foxpro program will compute the sum, product, difference and quotient of the two given number by our user. The code is very easy to understand and use.

Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com

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


** Basic Math in Visual Foxpro
** Written By: Mr. Jake R. Pomperada
** November 13, 2016   Sunday

SET TALK OFF
SET ECHO OFF
CLEAR
STORE 0 TO a
STORE 0 TO b

@ 1,20 Say "Basic Math Operations in Foxpro"
@ 3,1 Say "Enter First Value     : " Get A Pict "9999999"
@ 4,1 Say "Enter Second Value    : " Get B Pict "9999999"
READ
sum_all=a+b
product_all = a * b
diff_all = a - b
quotient_all = ROUND(a /b,2)


@ 6,20 Say "DISPLAY RESULTS"
@ 8,1 Say "The sum is " Get sum_all
@ 9,1 Say "The product is " Get product_all
@ 10,1 Say "The difference is " Get diff_all
@ 11,1 Say "The quotient is  " Get quotient_all

No comments:

Post a Comment