forked from Pavan-Kamthane/C_langauege_
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stationery bill
37 lines (30 loc) · 1.08 KB
/
stationery bill
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include<stdio.h>
int main()
{
printf(" Hello \n");
printf(" price list :- \n");
printf(" pen : 5 rs \n pencil : 7 rs \n eraser : 5 rs \n sharpner : 5 rs \n scale : 10 \n");
char item;
int pen,pencil,scale,eraser,sharpner;
printf(" Enter the number of pen purchased : ");
scanf("%d",&pen);
int a = pen*5;
printf(" Enter the number of pencils purchased : ");
scanf("%d",&pencil);
int b = pencil*7;
printf(" Enter number of scales purchased : ");
scanf("%d",&scale);
int c = scale*10;
printf(" Enter the number of eraser purchased : ");
scanf("%d",&eraser);
int d = eraser*5;
printf(" Enter the number of sharpner purchased : ");
scanf("%d",&sharpner);
int e = sharpner*5;
printf(" Your total cost for the pen is %d \n",a);
printf(" your total cost of pencil is %d \n",b);
printf(" Your total cost of erase is %d \n",e);
printf(" Your total cost of sharpner is %d \n",d);
printf(" Your total cost if scale is %d \n",c);
printf(" Net bill : %d",a+b+c+d+e);
}