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
What is queue in c?
What is the code for 3 questions and answer check in VisualBasic.Net?
What is nested structure?
What is hashing in c language?
List a few unconditional control statement in c.
What should malloc() do?
Why dont c comments nest?
Does c have function or method?
What are structures and unions? State differencves between them.
Write a C program to count the number of email on text
What is the difference between arrays and pointers?
i got 75% in all semester am i eligible for your company
What are pragmas and what are they good for?
what type of questions arrive in interview over c programming?
What is #include called?