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...
-
If you were to find another random sample of 10 cars based on the same data, what is the probability that exactly 4 of them will fall below the average? Make sure you interpret your results. If you...
-
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 2, Westies Company purchased 30, 10%, $1,000 Arkansas Company bonds for $31,000 cash plus brokerage fees of $1,000. Interest is payable semiannually on July 1 and January 1. On July 1, the...
-
You want to buy a room air conditioner. The price of one machine is $200. It costs $20 a year to operate. The price of another air conditioner is $300, but it costs only $10 a year to operate....
-
The Pierce Company had the following data (in thousands) for a given period: There were no beginning or ending inventories. Compute the (1) manufacturing cost of goods sold, (2) gross profit, (3)...
-
There are three rooms in a house: the kitchen, the bedroom, and the living room. There is a radio transmitter outside the home that can be received in each room. A user is wearing a device that can...
-
The following data are the amounts that a sample of 15 customers spent for lunch ($) at a fast-food restaurant. Complete parts (a) through (d) below. 7.42 6.33 5.79 6.50 4.89 6.49 5.53 7.85 8.35 8.30...
-
Explain quality in a healthcare system using three real world examples of quality initiatives in current use at a healthcare organization.
-
Compare and Contrast Leadership Styles and Evaluate the Best Coach Fit After reviewing the links below on coaching leadership styles present the coaches and their style might work best for you if you...
-
On October 15, 2023, the board of directors of Martinez Materials Corporation approved a stock option plan for key executives. On January 1, 2024, 38 million stock options were granted, exercisable...
-
An ARM is made for $240,000 for 30 years with the following terms: Initial interest rate = 7 percent Index = 1year Treasuries Payments reset each year Margin = 2 percent Interest rate cap = None...
-
Vincent owns a printer shop, Heartbreaker Ltd . For the month of November 2 0 2 3 , the transactions were as follows: November 2 0 2 3 1 Commenced business with RM 3 , 0 0 0 in the bank. 2 Purchased...
-
If R = B 2, R =B/5 2, R3 = D 2, and I=0.50 A, Calculate resultant resistance? b. At what rate is heat being generated in these resistors? c. Calculate the net voltage on the circuit? R R R
-
ABC Company's budgeted sales for June, July, and August are 14,800, 18,800, and 16,800 units, respectively. ABC requires 30% of the next month's budgeted unit sales as finished goods inventory each...
-
Reichenbach Co., organized in 2018, has set up a single account for all intangible assets. The following summary discloses the debit entries that have been recorded during 2018 and 2019. Instructions...
-
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...
-
Given the probabilities of expected states of the economy shown here, and the expected returns to stocks A and B in those states, what is the standard deviation of a portfolio with weights of 40...
-
The controller of Getty Industries has collected the following monthly expense data for use in analysis the cost behavior of maintenance costs. Instructions (a) Determine the fixed and variable cost...
-
Stock W has an expected return of 12.4 percent and a beta of 1.8. If the expected market return is 10 percent, what is the risk-free rate? a. -5.6% b. 3.0% c. 5.6% d. 7.0%
Study smarter with the SolutionInn App