noshin98

problem1010

Jun 12th, 2016
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int p_code,p_unit[2],i;
  5. float price[2],total;
  6. for(i=0;i<2;i++)
  7. {
  8.     scanf("%d %d %f",&p_code,&p_unit[i],&price[i]);
  9. }
  10. total=((p_unit[0]*price[0])+(p_unit[1]*price[1]));
  11. printf("VALOR A PAGAR: R$ %.2f\n",total);
  12. return 0;
  13. }
Add Comment
Please, Sign In to add comment