Question: assignment 1 Assignment Task Write a program that prompts the user to enter his/her name. Assume the maximum number of characters a user can enter
assignment 1

Assignment Task Write a program that prompts the user to enter his/her name. Assume the maximum number of characters a user can enter is 20. The input should be terminated by a terminal symbol say 'S'. If there is not sentinel value given by the user, your program should terminate giving an appropriate message to the user. Further to this user can give any number of spaces in the beginning and/or at the end of the input (before the sentinel value). You are not responsible for the spaces provided within the name. However the leading and trailing spaces Always remember that output should be truncated if user exceeds the max character limit while entering his/her name. Once the user enters the name, and presses RETURN key, your program should display it on serial monitor saying Welcome
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
