Question: Please only utilize and libraries. Q1. Write a program to print the arrow according to the following requirements. Example 3: Your program should receive two
Please only utilize

Q1. Write a program to print the "arrow" according to the following requirements. Example 3: Your program should receive two inputs and check the validity of cach input: 'lease input the length (integer): a) An integer length (data type: int), which represents the length of the arrow ("(" or ">" or Do you want to print U/D/L/R?: "" or "+") to be printed. The integer length should be greater than 3; Otherwise, your program should ask the user to input the fengor again util the input is valid. b) A character direction (data type: char), which indicates the direction of the arrow. And the directions of the arrow including 'L', 'R', 'U', 'D', representing "(" or ">" or"(" or "J" respectively. The character direction must be one of these four letters in uppercase or lowercase, i.e., 'L', I', 'R', 'r'. 'U'. u', 'D', 'd'. For the input other than the above letters, Example 4: the program should print "Wrong input!". Please input the length (integer): Notes: 1) We assume the length of each "*" is 1. o you want to print U/D/L/R?: 2) The size of the arrow edge is defined as _ . length , e.g., if length = 7, size(edge)-3; if length-9, size(edge)-4. 3) There is one space between two neighboring "*'s along the horizontal direction. Example 1: lease input the length (integer): Example 5: Please input the length (integer): 'lease input the length (integer): Please input the length (integer): Do you want to print U/D/L/R?: do you want to print U/D/L/R? : drone input! Example 2: 'lease input the length (integer) : lo you want to print U/D/L/RY
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
