repo.or.cz
/
letusc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
move to repo.or.cz
[letusc.git]
/
ch1
/
exercises
/
ex12.c
blob
5a0965fdcdaa1cfd6bb9cc094db5c8ebd4561284
1
/*profit and loss problem*/
2
3
#include<stdio.h>
4
5
int
main
()
6
{
7
float
sp
,
profit
;
8
float
cp
;
9
10
printf
(
"Enter the SP and profit: "
);
11
scanf
(
"%f %f"
,&
sp
,&
profit
);
12
13
cp
= (
sp
-
profit
)/
15
;
14
printf
(
"The cp of each item is %.2f
\n
"
,
cp
);
15
return
0
;
16
}