Solution Review: Find the Previous Alphabet
Let's see the detailed solution review of the challenge given in the previous lesson.
We'll cover the following...
Solution #
Press + to interact
#include <iostream>using namespace std;int main() {// Stores B in a character variablechar character = 'B';// Prints character valuecout << "Given character = " << character << endl;// Initializes another variable character_beforechar character_before ;// Decrement 1 from the character and then//store the updated value in character_beforecharacter_before = character-1;// Prints updated valuecout << "Character before = " << character_before << endl;return 0;}
...