Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- using namespace std;
- int tab[10][10];
- int main()
- {
- int a,b,c,d,e,i,j,k,l,m,mat,pol,ang,his,inf,kmat,kpol,kang,khis,kinf,sr;
- mat=0; pol=0; ang=0; his=0; inf=0;
- cout << "ilosc ocen z matematyki: ";
- cin >> a;
- cout << "podaj oceny: ";
- for (i=1;i<=a;i++)
- {
- cin >> tab[1][i];
- mat=mat+tab[1][i];
- }
- kmat=mat/a;
- cout << "Ocena koncoworoczna z matematyki to: " << kmat << endl << endl;
- cout << "ilosc ocen z jezyka polskiego: ";
- cin >> b;
- cout << "podaj oceny: ";
- for (j=1;j<=b;j++)
- {
- cin >> tab[2][j];
- pol=pol+tab[2][j];
- }
- kpol=pol/b;
- cout << "Ocena koncoworoczna z jezyka polskiego to: " << kpol << endl << endl;
- cout << "ilosc ocen z jezyka angielskiego: ";
- cin >> c;
- cout << "podaj oceny: ";
- for (k=1;k<=c;k++)
- {
- cin >> tab[3][k];
- ang=ang+tab[3][k];
- }
- kang=ang/c;
- cout << "Ocena koncoworoczna z jezyka angielskiego to: " << kang << endl << endl;
- cout << "ilosc ocen z histori: ";
- cin >> d;
- cout << "podaj oceny: ";
- for (l=1;l<=d;l++)
- {
- cin >> tab[4][l];
- his=his+tab[4][l];
- }
- khis=his/d;
- cout << "Ocena koncoworoczna z histori to: " << khis << endl << endl;
- cout << "ilosc ocen z informatyki: ";
- cin >> e;
- cout << "podaj oceny: ";
- for (m=1;m<=e;m++)
- {
- cin >> tab[5][m];
- inf=inf+tab[5][m];
- }
- kinf=inf/e;
- cout << "Ocena koncoworoczna z informatyki to: " << kinf << endl << endl;
- sr=kmat+kpol+kang+khis+kinf;
- cout << "SREDNIA KONCOWA TO: " << sr/5;
- getchar();
- cin.ignore();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement