Q1. Write a program that generates the following output:
10
20
19
Use an integer constant for the 10, and arithmetic assignment operator to generate the 20, and a decrement operator to generate the 19.
Q2. Write a program in c++ that takes the temperature in Fahrenheit and convert it to Celsius And Kelvin:
K = C + 273
C = (F - 32) / 1.8
Q3. Write the C++ code that takes the integer a, b, c, d and e from the user and display the output according to the following equation.
a3 + b2 - d / b
a ( b + c ( e + a ) / b )- 10
Q4. Write a program that will ask the user to input 5 digit numbers and find the sum of the given 5 digits: e.g.
Output:
Enter a 5 digit number: 12345
The sum of 5 digits is: 15