Write a C program to find the factorial of any number.
#include<stdio.h> #include<conio.h> main() { int n; long int fact=1; printf("\n Enter any number"); scanf("%d",&n); if(n==0) printf("\n The result=%d",fact); else { do { fact=fact*n; n--; }while(n>0); printf("\n The result=%d",fact); } getch(); }
Output:
Write a C program to print the following output.
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
Write a C program to print the following pattern output.
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
What are the difference between linear and non-linear data structure?
Describe Dimension of Software Quality
Write a C program to print all prime no.(1-100).
Write a C program to find factorial(using recursion) of any no.