Advertisement
noshin98

1010

Jun 12th, 2016
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int product1_code,product1_unit,product2_code,product2_unit;
  5.     double product1_price,product2_price,total;
  6.  
  7.     scanf("%d%d%",& product1_code,&product1_unit);
  8.     scanf("%lf",&product1_price);
  9.  
  10.     scanf("%d%d%",& product2_code,&product2_unit);
  11.     scanf("%lf",&product2_price);
  12.     total=product1_unit *product1_price+product2_unit*product2_price;
  13.     printf("VALOR TO PAGAR: %.2lf\n",total);
  14.  
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement