Write a program that allow the user to enter a single letter (both capital and lowercase) A-Z, a-z
- Ask the user to input a number between 0 and 9.
- Print out the user’s input into text. For example 1 should print “ONE”; 2 should print “TWO”;
- use if…elseif…else statement
- Go here: http://www.cplusplus.com/reference/cstring/strcmp/
- int strcmp(const char * str1, const char *str 2)
- What does this function do?
- What does it return?
- What does the function parameter take.
- Complete exercise number 1 except we will reverse the input and result.
- user input “ONE” (capitalized) the program should display 1.
- Write a program that allow the user to enter a single letter (both capital and lowercase) A-Z, a-z
- [hint] create a variable of type char to store the user’s input.
- And print the following:
- a = 1, b = 2, c = 3, A = 11, B = 22, C = 33
- if the user enter d,e,f,g,…z print out, “NO.”;
- In addition, I want to see your thoughts and understand of everything thus far. Comment (use single and multi-line) next to every single line of code stating its purpose.
*2017/02/21
- }
- return 0; // ????
- int main() {
- // ????
- using namespace std;
- // used to define where the function should exist
- #include <iostream>
- // includes the library iostream to receive the user’s input and print some variables
- */
- *If else statement practice.
- * Leonard Lam
- /**
- // Example of commenting I expect
Order from us and get better grades. We are the service you have been looking for.