Pages
Assignment
Synopsis
C
Graphics
Compiler
C#
DCN
DBMS
Discrete Math
DS
IT Fun
Java
Json
NIELIT
Notes
Office
OOPS
OS
PHP
Project
Phython
Question
SSAD
Web
UGC Net
VB
ASP
Thursday, 16 February 2017
Product of digit
Q : Write a program to calculate product of digit of a given page ?
Solution :
class
product
{
void
get_sum(
int
n)
{
int
i,sum=1,d;
while
(n>0)
{
d=n%10;
sum=sum*d;
n=n/10;
}
System.out.println(
"Product of each digit is "
+ sum);
}
}
Download Source Code
Next Question
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment