C
c
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
/*Make a program that reads a seller's name, his/her fixed
salary and the sale's total made by himself/herself in the
month (in money). Considering that this seller receives
15% over all products sold, write the final salary
(total) of this seller at the end of the month ,
with two decimal places.*/
//input:JOAO 500.00 1230.30
//optput:TOTAL = R$ 684.54
#include <stdio.h>
int main() {
char NAME[30];
double sale,salary,total;
scanf("%s",NAME);
scanf("%lf %lf",&salary,&sale);
total = salary+(sale*(15/100)) ;
//total = salary+((sale*15)/100);
printf("TOTAL = %.2lf",total);
return 0;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run