0

Can someone help me out with this program.


Programming problem – This program must meet the following criteria:
1. Character reading loop:
i. Requests the user to enter a character at the keyboard 5 different times.
ii. Reads in each character using getchar () within the loop.
iii. Verifies that the value entered is an alphabetic character (a through z or A through Z). If it is NOT an alphabetic character, the next step should be skipped and the user should be told there was an error with his entry.
iv. Prints each of the five characters and their ASCII values (integer) within the loop.
v. Each time you hit the return-key, it will be read as a character. You will need to adapt your program so that it ONLY reads the characters entered by the user (not the return, \n, that followed).

2. Integer value loop:
i. Requests the user to enter an integer value at the keyboard 5 different times.
ii. Verifies that the value entered is greater than 31 but less than 256 (valid ASCII range of printable characters).
iii. If the integer is within this range, prints the integer value and its character equivalent.

Please use printf and scanf.

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by frogboy77
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.