C program to find FIBONACCI seriesC program to find FIBONACCI series

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);   …

Read more »
30 Aug 2015

C program to find Factorial of a numberC 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 %…

Read more »
30 Aug 2015

C program which print its own source code as its outputC 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…

Read more »
30 Aug 2015

C program to print hello world without using semicolonC 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")){     } } …

Read more »
30 Aug 2015

Find out LCM of two numbersFind 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…

Read more »
30 Aug 2015
 
Top