Question: a) Write a C++program to display the multiplication table of a given integer. Example: Input a number (a multiplication table will be generated): 15 Expected
a) Write a C++program to display the multiplication table of a given integer. Example: Input a number (a multiplication table will be generated): 15 Expected Output: 151=15 1510=150 b) Write a C++ program to calculate the factorial of a given non-negative number. (n!) n!=123n 0!=1 this is a special case Example: Input number: 5 Expected Output: The Factorial of 5 is: 120 Your program should check if the number is negative, an error message should be displayed. 0}=1 11=1 2!=23!=64!=24 5!=120 c) Write a C++ program to determine whether a given number is prime or not. (A prime number is whole number greater than 1 with only two factors - itself and 1.) 1. Include comments (at beginning of your code and inline comments) in your code 2. Use loops efficiently and wisely 3. Make your program is protected against user errors
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
