Header Ads

URI Online Judge | 1010 Simple Calculate

#include <stdio.h>

int main() {

     int code1, units1, code2, units2;
    double price1,price2, amount;

    scanf("%d %d %lf",&code1,&units1,&price1);
    scanf("%d %d %lf",&code2,&units2,&price2);

    amount = (units1*price1)+(units2*price2);

    printf("VALOR A PAGAR: R$ %.2lf\n",amount);
    return 0;

}


No comments:

Powered by Blogger.