C program : How to find FIBONACCI series #include int main(){ int k,r; longint i=0l,j=1,f; //Taking maximum numbers form user printf("Enter the number range:"); scanf("%d",&r); …
C program to find Factorial of a number
C program : How to find factorial of a number #include int main(){ int i=1,f=1,num; printf("Enter a number: "); scanf("%d",&num); while(i f=f*i; i++; } printf("Factorial of %…
C program which print its own source code as its output
C program : How to print own source code as output using c #include int main(){ FILE *fp; char c; fp = fopen(__FILE__,"r"); do{ c= getc(fp); putchar(c); } w…
C program to print hello world without using semicolon
C program : How to print hello world without using semicolon #include void main(){ if(printf("Hello world")){ } } Solution: 2 #include void main(){ while(!printf("Hello world")){ } } …
Find out LCM of two numbers
C program to find out LCM of two numbers: #include int main(){ int n1,n2,x,y; printf("\nEnter two numbers:"); scanf("%d %d",&n1,&n2); x=n1,y=n2; while(n1!=n2){ if(n1>n2) n1…