Question: in c + + Counting 3 Write a program that reads in two chars, like B and F and prints all the characters in that
in c Counting
Write a program that reads in two chars, like B and F and prints all the characters in that range in the format:
BCDEF
Hints:
Your loop variable should be a char. Remember you can add one to a char and store it back into itself to increment it And that you can compare chars using etc...
You can use an if to figure out whether or not to print a but it is likely easier to always print inside the loop and treat the first or last letter as a special case that gets printed outside the loop.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
