1. Write a program that prompts the user to enter two numbers then an operator, The program should display the output using switch statements.
2. (a) Write a program to return the ASCII character of any key on the keyboard.
(b)Demonstrate how you would validate for:
(i) Numeric entry only
(ii) Alphanumeric entry only....
1
Expert's answer
2013-03-05T10:55:01-0500
1)
#include <iostream> #include <iomanip>
using namespace std;
int main() { double a, b; char sign; double result;
cout << "Enter an expression: "; cin >> a >> sign >> b;
Comments
Leave a comment