Q1 Write a program in c++ to find the factorial of a number using functions(without return statement)
Q2 Write a program in c++ to display and add 5 elements of an array
PLZ ITS URGENT
Answers
Answered by
6
Explanation:
Program for factorial of a number
Factorial of a non-negative integer, is multiplication of all integers smaller than or equal to n. For example factorial of 6 is 6*5*4*3*2*1 which is 720.
Sum of all Array elements means add all array Elements. Suppose we have 4 Elements in array and we want to find there sum.
arr[0]=4
arr[1]=2
arr[2]=1
arr[3]=6
Sum off all above elements are
arr[0]+arr[1]+arr[2]+arr[3]=4+2+1+6=13
I hope this may help you
Similar questions