Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Write an algorithm for a program that receives an integer as
input and outputs
the product of of its digits. E.g. 1234 = 24, 705 = 0

Answer Posted / krishna

#include<stdio.h>
#include<conio.h>
void main()
{
int n,n1.p=1;clrscr()printf("\n enter num");scanf("%d",&n);
while(n>0){ n1=n%10;p=p*n1;n=n/10;}printf("\n required answer is %d",p);
getch();
}

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

1506


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

181


What are predefined functions in c?

165


write a program for the normal snake games find in most of the mobiles.

1462


What is printf () in c?

174






Who developed c language?

225


What is the difference between mpi and openmp?

191


What is the difference between far and near in c?

208


#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??

1118


What are header files in c?

177


How many keywords (reserve words) are in c?

234


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

124


How does pointer work in c?

164


What is the difference between printf and scanf )?

189


Is r written in c?

165