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 1 Assignment Task Write a program that prompts the user to

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 For example, your program should be able to cater for following inputs. Rauf Butt$ Output should be: Welcome Rauf Butt Number of alphabets: 8 Rauf Butt $$ $ Output should be: Welcome Rauf Butt Number of alphabets: 8 Rauf Bu tt $ $ Output should be: Welcome Rauf Bu Number of alphabets: 8 tt Once your program has displayed the welcome message it should then blink the LED connected to pin13 of the Arduino UNO board for number of times equal to the alphabet count in the user given input. Note that we are talking about alphabets and not characters. 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 For example, your program should be able to cater for following inputs. Rauf Butt$ Output should be: Welcome Rauf Butt Number of alphabets: 8 Rauf Butt $$ $ Output should be: Welcome Rauf Butt Number of alphabets: 8 Rauf Bu tt $ $ Output should be: Welcome Rauf Bu Number of alphabets: 8 tt Once your program has displayed the welcome message it should then blink the LED connected to pin13 of the Arduino UNO board for number of times equal to the alphabet count in the user given input. Note that we are talking about alphabets and not characters

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!