Thursday, April 14, 2016

UVA Problem 10300: Ecological Premium -Solution

Unknown
#include <stdio.h>
int main ()
{
    int n, f,a,b,c;
    scanf("%d",&n);
    while (n--)
    {
        int premium=0;
        scanf("%d",&f);
        while (f--)
        {
            scanf("%d%d%d",&a,&b,&c);
            premium= premium+(a*c);
        }
        printf("%d\n",premium);
    }
    return 0;
}

Unknown

Studying at Shahjalal University of Science and Technology, Sylhet.

1 comments:

  1. Why there is no comment in the program?
    It may help one for better understanding

    ReplyDelete

Coprights @ 2016,