60. WAP to count and multiply numbers: >=5

#include<stdio.h>

void main()

{

        int num,r,c=0,mul=1;

        printf("Enter the number : ");

        scanf("%d",&num);

        for(;num;num=num/10)

        {

                r=num%10;

                if(r>=5)

                {

                        c++;

                        mul=mul*r;

                }

        }

        printf("Count = %d\n",c);

        printf("Mul = %d\n",mul);

}


Comments