## the sum of the first and last digit of this number.

(i) If a four-digit number is input through the keyboard, write a program to obtain the sum of the first and last digit of this number. Advertisements

## reverse the number

(h) If a five-digit number is input through the keyboard, write a program to reverse the number. ## Sum of its digits

(g) If a five-digit number is input through the keyboard, write a program to calculate the sum of its digits. (Hint: Use the modulus operator ‘%’) ## interchange the contents

(f) Two numbers are input through the keyboard into two locations C and D. Write a program to interchange the contents of C and D. ## Area & Perimeter of the rectangle

(e) The length & breadth of a rectangle and radius of a circle are input through the keyboard. Write a program to calculate the area & perimeter of the rectangle, and the area & circumference of the circle. ## Temperature Conversion

(d) Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature into Centigrade degrees ## Distance Conversion

(b) The distance between two cities (in km.) is input through the keyboard. Write a program to convert and print this distance in meters, feet, inches and centimeters. 