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 easiest sorting method to use?

614


Explain what are multibyte characters?

600


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

2492


Explain what is the difference between the expression '++a' and 'a++'?

604


What is the right type to use for boolean values in c? Is there a standard type?

538






Define C in your own Language.

607


What is the size of enum in bytes?

564


Write a program to generate the Fibinocci Series

633


What is meant by inheritance?

607


Tell me about low level programming languages.

613


can any one please explain, how can i access hard disk(physical address)? it is possible by the use of far,near or huge pointer? if yes then please explain......

1387


hi any body pls give me company name interview conduct "c" language only

1637


Explain the difference between exit() and _exit() function?

605


What is chain pointer in c?

576


Explain how can you determine the size of an allocated portion of memory?

594