To write a program to calculate the sales of product in a shop you can use:
CLS
REM program to calculate sales of products
DIM m(i)
summ = 0
sums = 0
sumn = 0
sumf = 0
sump = 0
sumb = 0
FOR i = 1 TO 6
READ mi(i)
summ = summ + mi(i)
NEXT i
DATA 20,45,20,40,50,35
PRINT"the sales of milk is:",summ
FOR i = 1 TO 6
READ s(i)
sums = sums + s(i)
NEXT i
DATA 30,10,90,45,15,60
PRINT"sales of milk is:",sums
FOR i = 1 TO 6
READ n(i)
sumn = sumn + n(i)
NEXT i
DATA ,10,20,80,12,15,50
PRINT"sales of notebooks is:",sumn
FOR i = 1 TO 6
READ f(i)
sumf = sumf + f(i)
NEXT i
DATA 34,24,50,16,25,50
PRINT"the sales of files is",sumf
FOR i = 1 TO 6
READ p(i)
sump = sump + p(i)
NEXT i
DATA 56,43,12,15,20,35
PRINT"the sales of pencil is:",sump
FOR i = 1 TO 6
READ b(i)
sumb = sumb + b(i)
NEXT i
DATA 23,59,20,10,40,30
PRINT"the sales of biro:",sumb
PRINT"THE TOTAL SALES FOR THE WEEK IS:"
total= summ + sums + sumn + sumf + sump + sumb
PRINT,total
PRINT"THE PRODUCT WITH THE HIGHEST NUMBER OF SALES IS:"
PRINT"sugar",sums
PRINT"THE SALES OF BIRO AND PENCIL:"
birpen= sumb + sump
PRINT,birpen
END
nice one
ReplyDeletevisit tootalky.wordpress.com for the second solution
ReplyDeletenice job bro..nice template too
ReplyDeleteThis comment has been removed by the author.
ReplyDelete