Thursday, November 16, 2017

1023 - Financial Management COJ Problem Solution






In C++.......................

#include<iostream>
#include <cstdio>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

////Nayeem Shahriar Joy,Applied Physics &Electronic Engineering,University of Rajshahi.

int main() {

    double a,sum=0;

        for(int i=0;i<12;i++)
        {
            cin>>a;
            sum=sum+a;
        }
        cout<<"$"<<sum/12.0<<endl;
    return 0;
}

No comments:

Post a Comment