Professional Documents
Culture Documents
float totalincome=0
float totalexpense=0
float totalsavings=0
float totalbal=0
float gsavings
float gexpense
float cps=0
float cpe=0
float gps=0
float gpe=0
int percentage=100
int a,b,c,numinc,numexp,numsave
float smessage=0
float emessage=0
expensex
incomex
int b=0
int a =0
g=0 printf(What is your expense goal in percentage?)
printf("3.INSERT SAVINGS")
True
End
End
case 2 printf( "INSERT EXPENSE") expensex break
savingsx
cps= totalsavings/totalincome*100
case 4 printf( "INSERT TOTAL") totalseb break total = totalincome-totalsavings-totalexpense
printf(Input your number of savings: )
printf(---------You're a good saver------) cps>gsavings&&cpe<gexpense
smessage = gsavings-cps
False
totalsavings = totalsavings + savings[c]
emessage = gexpense-cpe
End
c++
End
printf(Your total savings is: ) printf(Savings: )
False
False printf("GOAL")
printf("Savings")
True
c++
printf("Current Percentage")
printf(Expense: )
printf("Total Savings")
printf(You meet the goal!!! ) cpe = gexpense
True
False
printf(You meet the goal!!! ) cps==gsavings
True
True
cps<gsavings printf("You are lacking %.2f or .%.2f to your goal" )
True
End
printf(Total Expenses Php %10.2f %10.2f%% %10.2f%%",totalexpense,cpe,gpe))
False
False
a=0
b=0
False
a<numinc
True
c=0 False
b<numexp
printf(" " Income %d %.2f %s\n",idate[a],a+1,income[a],ipurpose[a] )
True
a++
c<numsave printf(" " Income %d %.2f %s\n",idate[b],b+1,income[b],ipurpose[b] )
False
True
b++
c++
End