Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ read in a stream of text, (not just a line, a stream of arbitrary length, ) a char at a time, and as you

image text in transcribed

C++ read in a stream of text, (not just a line, a stream of arbitrary length, ) a char at a time, and as you do so, shift each letter forward in the alphabet a certain number of places. The number of places is read from the command line in argc[1], and turned into an int with: int shift = atoi(argc[1]): Example: shift 13 Hello, Jack Uryyb, Wnpx READ THE COMMAND LINE FOR AN INTEGER IN ARGV[1] Run it through atoi() to convert the command line string to an integer: int shift = atoi(argv[1]): Here's the pseudocode: read in a character c if (c is a letter) { make c lowercase make c a number between 0 and 25 add the shift value to c mod c so it's between 0 and 25 again add a 'a' to c so it's a real ASCII letter again. } print c on the output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions