Question: Write in cpp 5. Write a function to calculate factorial of a given integer number if that number is a prime number. If it is

Write in cpp
5. Write a function to calculate factorial of a given integer number if that number is a prime number. If it is not, it will give an error. For example, Scenario 1 Input: 5 Output: 120 Scenario 2 Input: 4 Output: Error! Not a prime number. 4. Write a program to perform matrix addition between 3 matrices. For example, Input: 12 13 14 15 16 17 18 19 20 1 2 3 4 5 6 7 8 9 101 104 107 102 105 108 103 106 109 Output: 114 119 124 121 126 131 128 133 138
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
