Write a program to find the Factorial of a number
Answer / Raghvendra Kumar
```cppn#include <iostream>nnint factorial(int n) {n if (n == 0 || n == 1) return 1;n return n * factorial(n - 1);n}nnint main() {n int num;n std::cout << "Enter a number: ";n std::cin >> num;n std::cout << "Factorial of " num "":n std::cout << factorial(num) << std::endl;n return 0;n}n```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass
Explain terminate() function?
Which is the best c++ compiler for beginners?
What is time_t c++?
What is the difference between static global and global ?
What are associate containers?
What is the difference between a template and a macro?
Can class objects be passed as function arguments?
What is singleton class in c++?
What are register variables?
What is namespace std; and what is consists of?
Do you know what is overriding?