Social Icons

twitterfacebookgoogle pluslinkedinrss feedemail

Monday, August 27, 2012

BUBT 2nd PC Problem A - Calculate the Expenditure


BUBT 2nd Intra University Programming Contest, 2012
Problem A

Calculate the Expenditure

Problem statement:
Robin and his friends were making a visit from Dhaka to Cox’s Bazar.  Robin always keeps records of the expenditure of the things he buys. Now he wants to keep the expenditure of this tour.  As he is not very good in keeping the transactions, he requested you to write a program to help him keep his expenditure.

Input:
Input starts with a single integer N (1<=N<=100) denoting the number of expenditure. Then the next line will contain N numbers containing the amount of each expenditure.

Output:
In the output you had to print the total expenditure he made in the tour at a single line.

Sample Input:
10
10 18 1 150 45 30 70 12 35 68

Sample Output:
439


Problem setter: Abu Obaida Opu, Dept. of CSE
Bangladesh University of Business and Technology (BUBT)


No comments:

Post a Comment

 

Sample text

Sample Text