Someone write this program.
Attachments:
amrithanandini:
which software/program?
Answers
Answered by
1
class check
{
void main(int num)
{
int c1,c2;
int m=num;
while(m>0)
{
m=m%10;
if(m==0)
{
System.out.println("No. of 0's are"+c1);
c1++;
}
if (m==5)
{
System.out.println("No. of 5's are"+c2);
c2++;
}
}
}
{
void main(int num)
{
int c1,c2;
int m=num;
while(m>0)
{
m=m%10;
if(m==0)
{
System.out.println("No. of 0's are"+c1);
c1++;
}
if (m==5)
{
System.out.println("No. of 5's are"+c2);
c2++;
}
}
}
Similar questions