Write a C++ program in a file called pp8a.cpp to ask the user for two words, then
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a C++ program in a file called pp8a.cpp to ask the user for two words, then print them out in alphabetical order using strcmp.
) Execute your program and compare its output to the Expected Output column.
Input | Expected Output |
Enter hello for the first word and help for the second | Enter first word: hello Enter second word: help hello help |
Enter help then hello | Enter first word: help Enter second word: hello hello help |
Enter hello then hello | Enter first word: hello Enter second word: hello hello hello |
Enter hello and HELLO [Note how uppercase letters have a smaller ASCII value than lowercase letters] | Enter first word: hello Enter second word: HELLO HELLO hello |
Related Book For
The Science And Engineering Of Materials
ISBN: 9781305076761
7th Edition
Authors: Donald R. Askeland, Wendelin J. Wright
Posted Date: