This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: cout << "Their product is " << (m * n) << endl; cout << "Their quotient is " << (m / n) << endl; cout << "Their remainder is " << (m % n) << endl; return 0; } 6. Write a program that prints the ASCII codes for upper case and lower case vowels. E.g A = 65 7. Write a program that converts inches to centimeters. For example, if the user enters 23.7 for a length in inches, the output would be 60.98 cm . (One inch equals 2.54 centimeters.) 8. Identify the error in the following code. And correct it if needed. a. cin << count; b. if x < y min = x else min = y; c. cout << "Enter n: "; cin >> n; if (n < 0) cout << "That is negative. Try again." << endl; cin >> n; else cout << "o.k. n = " << n << endl; 9. Write a single C++ statement that prints "Exceeds " if the variable count exceeds 200. 10. Write a program that finds the minimum of four input integers. Enter four integers 22 33 56 89 The minimum value is 22...
View Full Document
This note was uploaded on 01/15/2012 for the course BIOINFO, B SHES1202 taught by Professor Idonotknow during the Spring '11 term at University of Malaya.
- Spring '11