1- Write a program that converts inches to centimeters. For example, if the user enters 16.9 for a length in inches, the output would be 42.926 cm. (One inch equals 2.54 centimeters.)
2- Write a single C++ statement that prints "Too many" if the variable count exceeds 100.
3- Write and run a program that reads the user’s age and then prints “You are a child.” if the age < 18, “You are an adult.” if 18 ≤ age < 65, and “You are a senior citizen.” if age ≥ 65.
4- Write and run a program that reads a six-digit integer and prints the sum of its six digits. Use the quotient operator / and the remainder operator % to extract the digits from the integer.
0 التعليقات :