move to repo.or.cz
[letusc.git] / ch2 / exercises1 / ex1.c
blobf7000fa8970960250f1323c1de90f26a7c2560fe
1 #include<stdio.h>
3 /*profit and loss problem*/
5 //int main()
6 //{
7 // float cp,sp;
8 // printf("Enter the cost price of the Item: ");
9 // scanf("%f",&cp);
10 // printf("Enter the selling price of the Item: ");
11 // scanf("%f",&sp);
13 // if(sp>cp)
14 // {
15 // printf("You have made a profit: ");
16 // printf("%.2f\n",(sp-cp));
17 // }
18 // else if(cp>sp)
19 // {
20 // printf("You have a loss of: ");
21 // printf("%.2f\n",(cp-sp));
22 // }
23 // else
24 // printf("You have neither made profit nor loss\n");
27 // return 0;
28 //}