Showing posts with label business programs in c. Show all posts
Showing posts with label business programs in c. Show all posts

Monday, December 2, 2019

Business Programs in C

A menu-driven business programs written in C programming language.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My Facebook address is https://www.facebook.com/profile.php?...

My personal website is http://www.jakerpomperada.com

My programming website is http://www.jakerpomperada.blogspot.com

I am also a book author you can purchase my books on computer programming and information technology in the following links below.


https://www.mindshaperspublishing.com/

https://www.unlimitedbooksph.com/

Thank you very much for your help and support.


Program Listing

business.c

#include <stdio.h>
#include<conio.h>

#define EMPLOYEE_PERCENTAGE 12.5f
#define EMPLOYER_PERCENTAGE 12.0f
#define TAXRATE 0.20

int main(){

float chosen = 0;
float balance = 0;
float tax;

int sales;
float comm;

int back;
float basicPay;
float employeeFund, employerFund;
do {
printf("\n\n");
printf("\n\n");
printf("BUSINESS PROGRAMS");
printf("\n\n");
printf("\t\t\n PLEASE SELECT A PROGRAM");
printf("\n");
printf("\t 1- Provident fund");  
printf("\n");
printf("\t 2- Gross salary");  
printf("\n");
printf("\t 3- Taxrate");  
printf("\n");
printf("\t 4- Minimum cost");  
printf("\n");
printf("\t 5- Commission");
printf("\n\n");
printf("pick a number:");
scanf("%f",&chosen); /* give a value for the if staterment to proceed  */
if (chosen == 1 ) {
printf("\n\n");
  printf("Enter basic pay:");
scanf("%f", &basicPay);
employeeFund=(basicPay/100)*EMPLOYEE_PERCENTAGE;
employerFund=(basicPay/100)*EMPLOYER_PERCENTAGE;
printf("Basic Pay: %f\n", basicPay);
printf("Employee contribution: %f\n", employeeFund);
printf("Employer contribution: %f\n", employerFund);
printf("\n\n");
printf("1 ::: quit: ");
printf("0 ::: return :::");
scanf("%d",&back);
printf("okay bye", back );
}else if ( chosen == 2 ){

    printf("\n\n");
    int gs,bs,da,ta;
printf("enter basic salary: ");
scanf("%d",&bs);
da=(10*bs)/100;
ta=(12*bs)/100;
gs=bs+da+ta;
printf("gross salary=%d",gs);
printf("\n\n");
    printf("1 ::: quit: ");
    printf("0 ::: return :::");
scanf("%d",&back);
printf("okay bye", back );
    
 
}

else if (chosen == 3){
printf("\n\n");
printf("Enter Balance ammount");
printf("\n\n");
scanf("%f",&balance);
tax = balance *TAXRATE;
printf("The tax on %.2f is %.2f\n",balance,tax);
printf("\n\n");
printf("1 ::: quit: ");
    printf("0 ::: return :::");
scanf("%d",&back);
printf("okay bye", back );
}

else if (chosen == 4){
printf("\n\n");
float p, cost, p1, cost1;
for(p=0; p<=10; p=p+0.1)
{
cost=40-8*p+p*p;
if(p==0)
{
cost1=cost;
continue;
}
if(cost>=cost1)
break;
cost1=cost;
p1=p;
}
p=(p+p1)/2.0;
cost=40-8;
printf("MINIMUM COST=%.2f AT p=%.1f", cost, p);
printf("\n\n");
printf("1 ::: quit: ");
printf("0 ::: return :::");
scanf("%d",&back);
printf("okay bye", back );
}
else if (chosen == 5){
        printf("Enter Total Sales: ");
scanf("%d", &sales);
if(sales<100)
printf("\nSorry no Commission, Please do more sales!");
else if (sales>=100 && sales<=500)
printf("\nCommission: %f", (sales*0.1));
else
{
comm = (sales>=100 && sales<=500);
printf("\nCommission:%f", (comm+100));
}
printf("\n\n");
printf("0 ::: return :::");
printf("1 ::: quit: ");
scanf("%d",&back);
printf("okay bye", back );
}while (back < 1);
return 0;
}