Computer Science, asked by mmrm36670, 3 months ago

Write a program to input a 3 – digit number. Check whether the sum of first and last digit is an

even number or an odd number.​

Answers

Answered by allysia
0

Answer:

USING PYTHON:

\\\tt a=int(inp ut("Enter\ a\ number: ")) \\\tt b=str(a) \\\tt sum=int(b[0])+int(b[-1]) \\\tt  if\ sum\%2==0: \\\tt {\qquad print("Sum\ is\ even.")}\\\tt else: \\\tt {\qquad print("Sum\ is\ not\ even.")}

Similar questions