move to repo.or.cz
[letusc.git] / ch1 / exercises / ex12.c
blob5a0965fdcdaa1cfd6bb9cc094db5c8ebd4561284
1 /*profit and loss problem*/
3 #include<stdio.h>
5 int main()
7 float sp,profit;
8 float cp;
10 printf("Enter the SP and profit: ");
11 scanf("%f %f",&sp,&profit);
13 cp = (sp - profit)/15;
14 printf("The cp of each item is %.2f\n",cp);
15 return 0;