Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please follow instructions. code in c. follow example Vrite a program that encodes the input characters using the following algorithm. - If the input character

please follow instructions. code in c. follow example image text in transcribed
Vrite a program that encodes the input characters using the following algorithm. - If the input character is a digit (' 0 ' through ' 9 '), then output the digit by adding 6 to the digit and calculate the remainder by 10 . For example, if a digit is ' 6 ', then replaced digit is ' 2 '. - Subtract the digit with ' 0 ', add 6 , and then calculate the remainder by 10 , then add ' 0 '. - If the character is an alphabetic letter, then shift the letter by 6. For example, if the letter is ' B ', then the letter becomes 'H'. - Subtract the letter with 'a' (for lower case) or 'A' (for upper case), add 6 , and then calculate the remainder by 26 , then add ' a ' (for lower case) or 'A' (for upper case). For example, 'X' shifted by 6 is ' '. - If the character is a white space, skip it. - If the character is not a digit, an alphabetic letter, or a white space, output the underscore ' ' character. - Follow the format of the examples below. - Use the getchar() function to read the input. Do not use scanf. - The user input ends with the user pressing the enter key (a new line character). - Character handling library functions in ctype.h is allowed

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_2

Step: 3

blur-text-image_3

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

Statistical And Scientific Database Management International Working Conference Ssdbm Rome Italy June 21 23 1988 Proceedings Lncs 339

Authors: Maurizio Rafanelli ,John C. Klensin ,Per Svensson

1st Edition

354050575X, 978-3540505754

More Books

Students also viewed these Databases questions

Question

Discuss the Rights issue procedure in detail.

Answered: 1 week ago

Question

Discuss the Rights issue procedure in detail.

Answered: 1 week ago

Question

Explain the procedure for valuation of shares.

Answered: 1 week ago

Question

Which months of this year 5 Mondays ?

Answered: 1 week ago

Question

Define Leap year?

Answered: 1 week ago

Question

outline some of the current issues facing HR managers

Answered: 1 week ago