Online Examination System for all learner!!! coming soon..

C : Program to check the number is strong number or not.

Code:

#include<stdio.h>
#include<conio.h>

main()
{
        int x,n;
        printf("Enter a number :");
        scanf("%d",&n);
        x=strong(n);
        if(x==n)
                printf("Strong");
        else
                printf("Not strong");
}
int strong(int n)
{
        int s=0,r,f;
        while(n>0)
        {
                r=n%10;
                f=fact(r);
                s=s+f;
                n=n/10;
        }
        return s;
}
int fact(int n)
{
        int f=1;
        while(n>0)
        {
                f=f*n;
                n--;
        }
        return f;
}

Output:

C Programming Online Test 1

Following quiz provides Multiple Choice Questions (MCQs) related to C Programming Framework. You will have to read all the given answ...