Question: Please help me out on this practice problem on Java 1. Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a

Please help me out on this practice problem on Java

1. Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature into Centigrade degrees using the formula

T(C) = (T(F) - 32) / 1.8

2. If a five-digit integer is input through the keyboard, write a program to calculate the sum of its digits. You are not allowed to use any libraries or change the integer to a string.

3. If a five-digit number is input through the keyboard, write a program to reverse the number. You are not allowed to use any libraries or change any integer to a string.

4. If the marks obtained by a student in five different subjects are input through the keyboard, find out the average marks obtained by the student. Assume that the maximum marks that can be obtained by a student in each subject is 100.

5. Two numbers are input through the keyboard into two locations C and D. Write a program to interchange the contents of C and D.

6. A cashier has currency notes of denominations 1, 5, 10, 20 and 100. If the amount to be withdrawn is input through the keyboard, find the total number of currency notes of each denomination the cashier will have to give to the customer.

7. If a five-digit integer is input through the keyboard, write a program to print a new number by adding one to each of its digits. For example if the number that is input is 12391 then the output should be displayed as 23402. You are not allowed to use any libraries, change any integer to a string or use the "if" statement.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!