#include <stdio.h>#include <tchar.h>#include <iostream>using namespace std;int main() { const int n = 5; int arr[n]; int sum = 0; for (int i = 0; i < n; i++) { cout<<"Input mark in "<<i+1<<" subject - "; cin>>arr[i]; sum+=arr[i]; cout<<endl; } cout<<"Average - "<<(double)sum/n<<endl; system("pause");}
Comments