C Program to Find LCM and GCD

/*C Program to Find LCM and GCD*/ #include<stdio.h> #include<conio.h> void main() { int n1,n2,a,b; printf(“\nEnter Two Numbers: “);  scanf(“%d %d”,&n1,&n2); a=n1;b=n2; while(n1!=n2) {     if(n1>n2)                       n1=n1-n2;     else                      n2=n2-n1; } printf(“\nLCM= %d”,(a*b)/n1); …

138,166 total views, 84 views today

Read More

C Program To Print Fibonacci Series

/*C Program To Print Fibonacci Series*/  #include<stdio.h> #include<conio.h> void main() { int n1=0,n2=1,count,n,fibo; clrscr(); printf(“\nEnter The Number of Fibonacci Series: “); scanf(“%d”,&n); if(n>=1)                 printf(“\n0”); if(n>=2)                printf(“\t1”); if(n>=3)          for(count=1;count<=n-2;count++)          {      …

25,629 total views, 8 views today

Read More

C Program To Print Tables

/*C Program To Print Tables*/ #include<stdio.h> #include<conio.h> void main() { int i,n; clrscr(); printf(“\nEnter The Number: “); scanf(“%d”,&n); for(i=1;i<=10;i++) {                printf(“\n%d * %d = %d”,n,i,n*i); } getch(); } 10,072 total views, no views today

10,072 total views, no views today

Read More

C Program To Find The Sum of Digits (Even and Odd) Of a Given Number

/*C Program To Find The Sum of Digits (Even and Odd) Of a Given Number */ #include<stdio.h> #include<conio.h> void main() { int n,even_sum=0,odd_sum=0,rem; printf(“\nEnter a number: “); scanf(“%d”,&n); while(n>0) {                    rem=n%10;        if(r%2==0)                    even_sum=even_sum+rem;  …

78,980 total views, 16 views today

Read More

C Program for Simple Calculator

/*C Program for Simple Calculator */ #include<stdio.h> #include<conio.h> void main() { int ur; float a,b; clrscr(); printf(“\n1. ADDITION\n 2. SUBTRACTION\n3. MULTIPLICATION\n4. DIVISION “); printf(“\n Enter User: “); scanf(“%d”,&ur); printf(“\nEnter Two Numbers: “); scanf(“%f%f”,&a,&b); switch(ur) { case 1:       printf(“\n\n%f + %f = %f”,a,b,a+b);       break; case 2:      printf(“\n\n%f –…

65,563 total views, 24 views today

Read More