Upcoming SlideShare
×

# 8.1

433 views

Published on

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
433
On SlideShare
0
From Embeds
0
Number of Embeds
28
Actions
Shares
0
3
0
Likes
0
Embeds 0
No embeds

No notes for slide

### 8.1

1. 1. PBL8.11.2.3.
2. 2. PBL 8.11.2.3.- %- / - http://www.lks.ac.th/kuanjit/
3. 3. scanf.htm http://ba.hcu.ac.th/Elearnin g/elearn.htm %scanf ( )#include <stdio.h>#include <conio.h>main()
4. 4. {float x1,P1,total,x2,P2,discount;char product1[10],name[10],product2[10];printf("nEnter your namet:t");scanf("%s",name);printf("nProduct1t:t");scanf("%s",product1);printf("nUnit1tt:t");scanf("%f",&x1);printf("nPrice1tt:t");scanf("%f",&P1);printf("n+++++++++++++++++++++++++n");printf("nnProduct2t:t");scanf("%s",product2);printf("nx2tt:t");scanf("%f",&x2);printf("nP2tt:t");scanf("%f",&P2);total=((x1*P1)+(x2*P2));discount=(total*.10);printf("n+++++++++++++++++++++++++nn");printf("Total Price ==>t:t%.2f",total);printf("n+++++++++++++++++++++++++nn");printf("ndiscount 10% ==>t:t%.2f",discount);getch();
5. 5. }