### Factorial of Number in C-Programming

Factorial without Recursion #include <stdio.h> int main() { int n, i; unsigned long long factorial = 1; printf("Enter an integer: "); scanf("%d",&n); // show error if the user enters a …

Factorial of Number in C-Programming Read More

### Sum of Natural Numbers in C-Programming

FOR LOOP #include <stdio.h> int main() { int n, i, sum = 0; printf("Enter a positive integer: "); scanf("%d",&n); for(i=1; i <= n; ++i) { sum += i; // sum …

Sum of Natural Numbers in C-Programming Read More

### Even or Odd in C program

//Even or Odd #include <stdio.h> int main() { int number; printf("Enter an integer: "); scanf("%d", &number); // True if the number is perfectly divisible by 2 if(number % 2 == …

Even or Odd in C program Read More

### Check Whether a Number is Armstrong or Not in C Program

/*Armstrong or Not*/ #include<stdio.h> main() { int n,r,c,sum=0,temp; printf("Enter number:"); scanf("%d",&n); temp=n; while(n>0) { r=n%10; c=r*r*r; sum=sum+c; n=n/10; } n=temp; if(n==sum) printf("ArmStrong Number"); else printf("Not ArmStrong Number"); } Example: 153 …

Check Whether a Number is Armstrong or Not in C Program Read More