Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me with this question USING C PROGRAMMING LANGUAGE. Thanks! Problem 2-Characters (50 points) In this program, we define an input to be in

image text in transcribed

image text in transcribed

Please help me with this question USING C PROGRAMMING LANGUAGE. Thanks!

Problem 2-Characters (50 points) In this program, we define an input to be in order if the characters of the input 1. are alphabetic letters, lower case or upper case. 2. any two neighboring letters (regardless of case) are in order, for example, 'c' and 'K' are in order but 's' and 'b' is not in order because 'c' is less than 'k' and 's' is greater than 'b', considering their ASCII values. 3. if two neighboring letters are same, they are considered in order. Write a program that determines if the input is in order. 1) Assume the input contains two or more characters. 2) Convert input characters to lower case before comparison. 3) The user input ends with the user pressing the enter key (a new line character). 4) getchar() to input. Ch acter handling are allowed. Hint: use two variables to keep track of two neighboring characters. Example #1: Input: "all" Output: In order Example #2: Input: "littlepigs" Output: Not in order Example #3: Input: "CS" Output: In order Example #4: Input: "F28" Output: Not in order

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

Strategic Database Technology Management For The Year 2000

Authors: Alan Simon

1st Edition

155860264X, 978-1558602649

More Books

Students also viewed these Databases questions

Question

1. Administrative services, such as wages.

Answered: 1 week ago

Question

3. You can gain power by making others feel important.

Answered: 1 week ago