Computer Science, asked by mmrm36670, 5 months ago

Write a program to input an integer and check whether it is a 5 – digit number or not. If it is,

extract the central digit and print it.​

Answers

Answered by allysia
1

Answer:

A python program goes like:

\\\tt a=i nt(in put("Enter\ a\ number: ")) \\\tt con=str(a)\\\tt if \ len(con)==5: \\\tt {\qquad print("It's\ a\ 5\ digit\ number\ with\ middle\ digit\ as", con[2],".")}\\\tt else: \\\tt {\qquad print("It's\ not\ a\ 5\ digit\ number.")}

Similar questions