Search
 
SCRIPT & CODE EXAMPLE
 

C

strong number in c

#include <stdio.h>
int main()
{
	int number,temp,fact,rem,sum =0;
    printf("Enter Number to check wheather given number is Strong or Not ");
    scanf("%d",&number);
    temp = number;
    while(number>0)
    {
    	fact = 1;
    	rem = number%10;
        for(int i = rem;i>=1;i--)
        fact = fact*i;
        sum += fact;
    }
    if(temp == sum)
    printf("%d is a Strong Number",temp);
    else
    printf("%d is not a Strong NUmber",temp);
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: multiplication table in c using array 
C :: goto statement in c 
C :: Hello world in C programming language 
C :: c for loop 
C :: merge sort for strings in c 
C :: gcc option to show rules of makefile 
C :: space x 
C :: fgets function in c 
C :: count distinct characters in a string C 
C :: celsius to fahrenheit formula 
C :: fgets remove newline 
C :: measure time in c 
C :: convert c program to assembly language online 
C :: form controls in bootsrap 
C :: c for 
C :: sort names in array in c 
C :: how to get file size in c 
C :: c break statement 
C :: #0000ff 
C :: mysql yyyymm format 
C :: c program to find minimum of 5 numbers using conditional operator in c 
C :: Write a C program to multiply two integers using pointers. 
C :: fwrite c 
C :: check command line input is a number in c 
C :: how to take input in c 
C :: C Accessing Union Members 
C :: c to c convertor 
C :: amazon kinesis disaster recovery 
C :: c create array 
C :: Parsing using strtok 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =