Write a program that, 1. Prompts the user to input an integer between 33 and 126...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that, 1. Prompts the user to input an integer between 33 and 126 and assign it to a variable called userInt. 2. Prompt the user for a floating point number and assigns it to a variable called userFloat 3. Prompt the user for a character and assigns it to a variable called userChar 4. Prompt the user for a string and assign it to a variable called userString. The program should then 1. Output the four values on a single line separated by a space. 2. Output the four values in reverse of the way they appear in 1. 3. Convert the integer to a character by using the 'chr()' function, and output that character. So, for example, if you provided the following four values: 99 2.77 Z Howdy The output should look like: 99 2.77 z Howdy Howdy z 2.77 99 99 converted to a character is c Write a program that, 1. Prompts the user to input an integer between 33 and 126 and assign it to a variable called userInt. 2. Prompt the user for a floating point number and assigns it to a variable called userFloat 3. Prompt the user for a character and assigns it to a variable called userChar 4. Prompt the user for a string and assign it to a variable called userString. The program should then 1. Output the four values on a single line separated by a space. 2. Output the four values in reverse of the way they appear in 1. 3. Convert the integer to a character by using the 'chr()' function, and output that character. So, for example, if you provided the following four values: 99 2.77 Z Howdy The output should look like: 99 2.77 z Howdy Howdy z 2.77 99 99 converted to a character is c
Expert Answer:
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these algorithms questions
-
Referring to Table 25.2, explain why you might expect Cr and Fe to form miscible alloys. TABLE 25.2 The Crystal Structures of the 3d Elements Metal Sc Ti V Cr Mn Fe Co 8 235 Ni Cu Zn Natural Crystal...
-
Briefly describe ASCII and Unicode and draw attention to any relationship between them. [3 marks] (b) Briefly explain what a Reader is in the context of reading characters from data. [3 marks] A...
-
The annual revenues associated with several large apartment complexes are $300, $450, $425, $50, $75, and $150 for years 0, 1, 2, 3, 4, and 5, respectively. Determine the net cash flow and whether...
-
On January 1, Hise Corporation purchased a 35% equity in Schoenthaler Company for $220,000. At December 31, Schoenthaler declared and paid a $50,000 cash dividend and reported net income of $140,000....
-
Assume that two 25-year, 6% bond issues are identical, except that one bond issue is callable at its face amount at the end of 5 years. Which of the two bond issues do you think will sell for a lower...
-
Show that \(\left(\frac{1}{2}, \frac{1}{2} ight)\) is the optimal policy for Example 18.2 . Example 18.2 (Volatility pumping) Suppose there are two assets available for investment. One is a stock...
-
Consider a tube wall of inner and outer radii r; and r o , whose temperatures are maintained at T i and T o , respectively. The thermal conductivity of the cylinder is temperature dependent and may...
-
Consider a 10 year bond with face value $1,000, pays 6% coupon annually and has a yield-to-maturity of 7%. How much would the approximate percentage change in the price of bond if interest rate in...
-
The trial balance of Garvey, Inc., at September 30, 2012, does not balance: The accounting records hold the following errors: a. Recorded a $100 cash revenue transaction by debiting Accounts...
-
The locus of the centre of the circle which cuts off intercepts of length 2a and 2b from x-axis and y-axis, respectively, is? A) x+y=a+b B) x + y =a + b C) x-y=a-6 D) x + y=a-b
-
Securitization has allowed some banks to concentrate on Question 4 options: 1) origination of loans. 2) credit risk. 3) specialized lending. 4) all of the above
-
If your annual gross income is $70,000, you can afford to earn a house that requires a monthly mortgage payment of around $2,000.
-
KLA Tencore Company 1) As the company's financial manager, based on current scenario of your company which dividend policy would you recommend adopting by your company? 2) Your company has a...
-
The public interest model tends to favor easing regulations. Question 17 options: 1) True 2) False
-
Which one of the following is NOT a systematic risk? Group of answer choices Hyperinflation Strong dollar Robert Iger is returning to lead Disney as CEO. Russia-Ukraine War
-
Global.asax is used for: a. declare application variables O b. all other answers are wrong O c. declare global variables O d. handle application events
-
Rowland Textile Inc. manufactures two products: sweatshirts and T-shirts. The manufacturing process involves two activities: cutting and sewing. Expected overhead costs and cost drivers are as...
-
Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers separated by exactly one space (i.e., if a number appears multiple times, it is...
-
Write a program that displays a circle of radius 10 pixels filled with a random color at a random location on a pane, as shown in Figure 15.29b. When you click the circle, it disappears and a new...
-
Write a program that prompts the user to enter a positive integer and displays all its smallest factors in decreasing order. For example, if the integer is 120, the smallest factors are displayed as...
-
What are the four main consumer rights?
-
What is the role of the Securities and Exchange Commission?
-
In what ways do companies demonstrate their social responsibility?
Study smarter with the SolutionInn App