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

C program for solving quadratic equationC program for solving quadratic equation

C program : How to solve quadratic equation using C  #include #include   int main(){   float a,b,c;   float d,root1,root2;         printf("Enter a, b and c of quadratic equation: ");   scanf("%f%f%f"…

Read more »
07 Aug 2015

 c program to find Variance, Mean, Standard Deviation c program to find Variance, Mean, Standard Deviation

C program - How to Find Variance, Mean and Standard Deviation using C #include #include #include #define MAXSIZE 10 void main() {  float x[MAXSIZE];  int   i, n;  float avrg, var, SD, sum=0, sum1=…

Read more »
07 Aug 2015

C program to convert days into years,weeks and daysC program to convert days into years,weeks and days

C program : How to convert days into years,weeks and days #include #define DAYSINWEEK 7 void main() {  int ndays, year, week, days;  printf("Enter the number of days\n");  scanf("%d",&ndays);  year …

Read more »
07 Aug 2015

c program to find out perfect numberc program to find out perfect number

C program - How to find out the perfect number #include int main(){   int n,i=1,sum=0;     printf("Enter a number: ");   scanf("%d",&n);     while(i       if(n%i==0)            sum=sum+i;           i…

Read more »
07 Aug 2015

c program to check given number is palindrome number or notc program to check given number is palindrome number or not

C program : How to check given number is palindrome number or not  #include int main(){     int num,r,sum=0,temp;       printf("Enter a number: ");     scanf("%d",&num);       temp=num;     while(num…

Read more »
07 Aug 2015

Check given number is armstrong number or notCheck given number is armstrong number or not

C program to check the given number is armstrong number or not #include int main(){     int num,r,sum=0,temp;       printf("Enter a number: ");     scanf("%d",&num);       temp=num;     while(num!=0)…

Read more »
07 Aug 2015

check given number is strong number or notcheck given number is strong number or not

C program -  How to check given number is strong number or not #include int main(){   int num,i,f,r,sum=0,temp;     printf("Enter a number: ");   scanf("%d",&num);     temp=num;   while(num){       i…

Read more »
07 Aug 2015
 
 
 
Top