words per minute

10

Veer_Bharat_Roy


00:00

Speed

Q. C++ code to find the multiplication of two matrices using class and object approach #include <iostream> using namespace std; int main() { int n, i, m=0, flag=0; cout << "Enter the Number to check Prime: "; cin >> n; m=n/2; for(i = 2; i <= m; i++) { if(n % i == 0) { cout<<"Number is not Prime."<<endl; flag=1; break; } } if (flag==0) cout << "Number is Prime."<<endl; return 0; } Input: Enter Matrix A Enter x[0][0] : 1 Enter x[0][1] : 2 Enter x[1][0] : 3 Enter x[1][1] : 4 Enter Matrix B Enter x[0][0] : 4 Enter x[0][1] : 3 Enter x[1][0] : 2 Enter x[1][1] : 1 Matrix A: 1 2 3 4 Matrix B: 4 3 2 1 Output: Addition of A and B matrix 8 5 20 13
words per minute
0
wpm
accuracy
0%
Text Practice - Time 211 - English

words per minute