Computer Science, asked by ddebo9, 21 days ago

0
0 1
0 1 4
0 1 4 9
0 1 4 9 16
Write a program to generate such output ​

Answers

Answered by kalpanasridhar19
0

Answer:

Example:

Sample Input : n = 15

Sample Output : 1, 3, 5

(b) find and display the factorial of a number input by the user (the factorial of a non-negative integer n, denoted by n!, is the product of all integers less than or equal to n.)

Example:

Sample Input : n = 5

Sample Output : 5! = 1*2*3*4*5 = 120

For an incorrect choice, an appropriate error message should be displayed.

Similar questions