Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <ctype.h>
- void main()
- {
- char firstChar, secondChar, halfwayChar;
- std::cout << "Enter first char: ";
- std::cin >> firstChar;
- std::cout << "Enter second char: ";
- std::cin >> secondChar;
- firstChar = tolower(firstChar);
- secondChar = tolower(secondChar);
- halfwayChar = (firstChar + secondChar) / 2;
- std::cout << "The letter half way in between those is: " << halfwayChar << std::endl;
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment