Kat H.

asked • 04/12/21

Next Two Letters. Read in a character (it will always be a lower case letter). Print out the two letters that come after it without any spaces. Once you go past 'z' you should wrap back to 'a'.

Read in a character (it will always be a lower case letter). Print out the two letters that come after it without any spaces. Once you go past 'z' you should wrap back to 'a'.


Hint: You can add numbers to chars to shift them... You will need an if to check for "wraparound", but you should not have "if 'a' print 'bc'... if 'b' print 'cd'...".


Code:


#include <iostream>

using namespace std;


int main()

{

//YOUR_CODE

}


1 Expert Answer

By:

Patrick B. answered • 04/12/21

Tutor
4.7 (31)

Math and computer tutor/teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.