wap to print the maximum digit preaent in the no.[related to java]
Answers
Answered by
0
laskrhdjksjsjftjsmrrmd
Answered by
0
n is the number by user
int max=0;
while(n>0)
{
int rem=n%10;
if(rem>max)
max=rem;
n/=10;
}
The max digit will be in max
int max=0;
while(n>0)
{
int rem=n%10;
if(rem>max)
max=rem;
n/=10;
}
The max digit will be in max
Similar questions
Math,
7 months ago
Social Sciences,
7 months ago
Math,
1 year ago
Math,
1 year ago
Environmental Sciences,
1 year ago
Math,
1 year ago
Math,
1 year ago