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
#include <stdio.h>
float calc(float a,float b,float c){
float k,d,s;
d=(a+b+c)*1.07;
if((a>b)&&(a>c))
k=(a+(b+c)*0.7)*1.07;
if((b>a)&&(b>c))
k=(b+(a+c)*0.7)*1.07;
if((c>a)&&(c>b))
k=(c+(b+a)*0.7)*1.07;
//in case i buy 2 item with same of the most expensive price
if((a==b)||(a==c)||(b==c)){
if((a==b)&&(c<a))
k=(a+b+c*0.7)*1.07;
if((a==c)&&(b<a))
k=(a+b*0.7+c)*1.07;
if((b==c)&&(a<b))
k=(a*0.7+b+c)*1.07;
}
s=(d-k);
return s;
}
int main() {
float a,b,c;
scanf("%f,%f,%f",&a,&b,&c);
//printf("%f,%f,%f",a,b,c);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run