Answered step by step
Verified Expert Solution
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
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 orderStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started