English, asked by divyashinde47, 10 months ago

Write a program, which will find all such numbers between m and n (both included) such that each digit of the number is an even number.

Input Format:
The first line contains value m and n separated by a comma.

Output Format:
The numbers obtained should be printed in a comma-separated sequence on a single line.

Constraints:
1000<=m<=9000
1000<=n<=9000

Answers

Answered by nidaeamann
0

Explanation:

Void main void

{

   int m, n

  m. n = input("enter the two numbers")

  if (m > n)

  {

    if ( m %% 2 == 0)

    i = m;

    while (i < n)

    {

     print ( i )

      i = i+2;  

     }

     else

     i = m+1;

    while (i < n)

    {

     print ( i )

      i = i+2;  

     }

   else                  // when n>m

  {

    if ( n %% 2 == 0)

    i = n;

    while (i < m)

    {

     print ( i )

      i = i+2;  

     }

     else

     i = n+1;

    while (i < m)

    {

     print ( i )

      i = i+2;  

     }

return

}

Similar questions