Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 single charater constant and string constant?

1100


What are local static variables? How can you use them?

1156


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1177


how to create duplicate link list using C???

2564


What is the size of structure pointer in c?

1072


What is the use of pointers in C?

1089


Is sizeof a keyword in c?

976


How do you sort filenames in a directory?

1190


can any one tel me wt is the question pattern for NIC exam

1990


Difference between goto, long jmp() and setjmp()?

1185


the maximum length of a character constant can be a) 1 character b) 8 characters c) 256 chaacters d) 125 characters

2302


Who developed c language?

1106


What is the size of enum in bytes?

1092


What is the easiest sorting method to use?

1182


Write a program of prime number using recursion.

1098