Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

Students also viewed these Databases questions

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago