Calculate the result of every student of each section as follows 1 Obtained

Calculate the result of every student of each section

This preview shows page 7 - 11 out of 13 pages.

Marks for each subject of every student of each section must be taken from the user. Calculate the result of every student of each section as follows: 1. Obtained marks (Sum of all courses marks). Max. marks of each subject are 100 2. Percentage Source Code : #include <iostream> #include <iomanip> using namespace std; int main() { int x[3][8][5];
Image of page 7
Image of page 8
Task 4 : Exercise 4 Write a C++ program, that read 12 integer values from user, store values in Matrix of 4 X 3. Create another Matrix of 4 X 3, divide each element of Matrix1 by five, and store the result in the Matrix2. Print Matrix A, with heading shown, correctly spaced. Print Matrix B, with heading shown, correctly spaced. Your Program should display output as follows: Source Code : #include <iostream> #include <iomanip> using namespace std; int main() { int m[4][3]; double n[4][3]; cout<<setw(35)<<setfill('=')<<"="<<endl; cout<<" Enter Values for matrice A "<<endl; cout<<setw(35)<<setfill('=')<<"="<<endl; for(int i=0;i<4;i++) { for(int j=0;j<3;j++) { cout<<"Value of ["<<i<<"]["<<j<<"] is "; cin>>m[i][j]; } } //dividing 1st matrices by 5 nd saving in 2nd matrices for(int i=0;i<4;i++) { for(int j=0;j<3;j++) { n[i][j]=m[i][j]/5.00; } }
Image of page 9
cout<<setw(35)<<setfill('=')<<"="<<endl; cout<<" Matrix A- Divided by 5 "<<endl; cout<<setw(35)<<setfill('=')<<"="<<endl<<endl<<endl; //print values of 2nd matrices after dividing by 5 for(int i=0;i<4;i++) { for(int j=0;j<3;j++) { cout<<n[i][j]<<" "; } cout<<endl; } return 0; } Output : Task 5 :
Image of page 10
Image of page 11

You've reached the end of your free preview.

Want to read all 13 pages?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture