Question: ng ( ) Name: Student ID: Section: [5. MARKS] Create a program that declares the following five variables: letter_1 is a character variable. number_2 islan

 ng ( ) Name: Student ID: Section: [5. MARKS] Create a

ng ( ) Name: Student ID: Section: [5. MARKS] Create a program that declares the following five variables: letter_1 is a character variable. number_2 islan integer variable. - value_3 is a Boolean variable. number_4 is a floating-point variable. number_5 is a double float-point variable. Next prompt the user to enter a value for each variable from the keyboard: (The values entered by the user from the keyboard should be assigned to the variable.) Enter a value for letter 1: (Enter M from the keyboard) Enter a value for number_2: (Enter 5 from the keyboard) Enter a value for value_3: (Enter 1 from the keyboard) Enter a value for number_4: (Enter 5.0 from the keyboard) Enter a value for number_5: (Enter 5.0 from the keyboard) Next perform the following arithmetic operations with each variable. a. letter_1 = letter_1 +32; b. number_2 = (number_2 + 3) * 6: c. value_3 (2 + value_3) * 6: d. number_4 = number 4 / 5 22.0: e. number_5 = number_5 / 5 * 22.0: Finally, display the new values of each variable as follows: The new value for letter_1 is: X (USING FIELD WIDTH OF 1) The new value for number_2 is: XXXXX (USING FIELD WIDTH OF 5) The new value for value_3 is: X (USING FIELD WIDTH OF 1) The new value for number_4 is: xxx.xx (USING FIELD WIDTH OF 5 WITH 2 DECIMAL PLACES) The new value for number_5 is: xxxxx, xox (USING FIELD WIDTH OF 9 WITH 4 DECIMAL PLACES) The Name, Student ID and Section number that appears in the output of

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!