Escolar Documentos
Profissional Documentos
Cultura Documentos
INSTRUCTIONS
Section A
vim reverse.cpp
#include <iostream>
using namespace std;
int main()
{
int n, revNo = 0, remainder;
while(n != 0)
{
remainder = n%10;
revNo = revNo*10 + remainder;
n /= 10;
}
return 0;
}
OUTPUT:
PS C:\Users\Naveen> ./c
main()
{
int a, b, c, d, mat1[10][10], mat2[10][10], sum[10][10];
cout << "Enter the number of rows and columns of matrix 1";
cin >> a >> b;
cout << "Enter the elements of matrix 1\b";
return 0;
}
OUTPUT:
PS C:\Users\Naveen> ./a
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10
2 4 6 8 10
12 14 16 18 20
Section B:
Q3.
UPDATE STUDENT