Chapter: Function and Pointer | Let us C solution with details description and tutorials | yashwant kanetkar Decision Control Structure S.N Chapter S.N Chapter 1 Decision Control Structure 5 Arrays 2 The Loop Control Structure 6 Puppetting On Strings 3 The Case Control Structure 7 Structures 4 Function and Pointer 8 Input/Output in C [D] Answer the following: (a) Write a function to calculate the factorial value of any integer entered through the keyboard. Show Solutions Hide Solutions /* 4 (a) Write a function to calculate the factorial value of any integer entered through the keyboard. */ #include<stdio.h> #include<conio.h> int factorial(int n); int main() { int n,fact; printf("enter no. to find factorial "); scanf("%d",&n); fact=factorial(n); printf("the factorial of %d is %d",n,fact); getch(); ...
Comments
Post a Comment