Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main()
- {
- double marks[3][2];
- for(int i=0; i<3; i++)
- {
- for(int j=0; j<2; j++)
- {
- cin>>marks[i][j];
- }
- }
- for(int i=0; i<3; i++)
- {
- for(int j=0; j<2; j++)
- {
- cout<<marks[i][j]<< " ";
- }
- cout<<endl;
- }
- for(int j=0; j<2; j++)
- {
- double sum = 0;
- for(int i=0; i<3; i++)
- {
- sum= sum+ marks[i][j];
- }
- cout<<"avg marks of course "<<j << " is "<<(sum/3)<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement