Declare the following three variables: char letter; int number; double decimalNumber; Prompt the user to enter a letter. Read the letter into the variable letter Assign to the variable Assign to the variable Print the values of the three variables using the following format: number the value from the variable letter decimalNumber the value from the variable number Character: K Number: 75 Decimal number: 75 Test the program with the input letter a and copy the results into a comment at the end of your code:

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question
Declare the following three variables:
char letter;
int
number;
double decimalNumber;
Prompt the user to enter a letter.
Read the letter into the variable letter
Assign to the variable
Assign to the variable
Print the values of the three variables using the following format:
number the value from the variable letter
decimalNumber the value from the variable number
Character:
K
Number:
75
Decimal number: 75
Test the program with the input letter a and copy the results into a comment at the end of your code:
/* Execution Results:
Put the results here.
*/
Test the program again with the input letter A and copy these results below the first execution results.
Print the completed program with both execution results.
Transcribed Image Text:Declare the following three variables: char letter; int number; double decimalNumber; Prompt the user to enter a letter. Read the letter into the variable letter Assign to the variable Assign to the variable Print the values of the three variables using the following format: number the value from the variable letter decimalNumber the value from the variable number Character: K Number: 75 Decimal number: 75 Test the program with the input letter a and copy the results into a comment at the end of your code: /* Execution Results: Put the results here. */ Test the program again with the input letter A and copy these results below the first execution results. Print the completed program with both execution results.
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning