(1) Prompt the user to input an integer, a double, a character, and a string, storing...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. (Submit for 2 points). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy (2) Extend to also output in reverse. (Submit for 1 point, so 3 points total). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 (3) Extend to cast the double to an integer, and output that integer. (Submit for 2 points, so 5 points total). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 3.77 cast to an integer is 3 (1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. (Submit for 2 points). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy (2) Extend to also output in reverse. (Submit for 1 point, so 3 points total). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 (3) Extend to cast the double to an integer, and output that integer. (Submit for 2 points, so 5 points total). Enter integer: 99 Enter double: 3.77 Enter character: z Enter string: Howdy 99 3.77 z Howdy Howdy z 3.77 99 3.77 cast to an integer is 3
Expert Answer:
Answer rating: 100% (QA)
JAVA CODE 1 import javautilScanner public class BasicInput public static void mainString args Scanne... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
How much will be recorded as a deduction from retained earnings on the books of Bravo, Inc on the date of declaration? How much would be the amount on property Dividends that would be distributed by...
-
(1) Prompt the user to input an integer, a double, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. Note: This...
-
You will design and implement your own data class. The class will store data that has been read as user input from the keyboard (see Getting Input below), and provide necessary operations. As the...
-
__________ is the process that occurs when a job applicant does research on an organization and concludes there is enough of a fit between themselves and a job opening to warrant submitting their...
-
The power transmission cable has a weight per unit length of 15lb/ft. If the lowest point of the cable must be at least 90 ft above the ground, determine the maximum tension developed in the cable...
-
A delivery company's trucks occasionally get parking tickets, and based on past experience, the company plans that each truck will average 1.3 tickets a month, with a standard deviation of 0.7...
-
Write context switch code for your favorite CPU.
-
Steam at 260C and 7.00bar absolute is expanded through a nozzle to 200C and 4.00bar. Negligible heat is transferred from the nozzle to its surroundings. The approach velocity of the steam is...
-
What are company annual reports? A thorough report describing a company's activities over the past year. A way for a company to increase its stock price. A method for a company to track its...
-
Create a Windows Forms application. Use the following names for the project and solution, respectively: States Capitals Project and States Capitals Solution. Save the application in the VB2017\Chap04...
-
What are the similarities between the Rosenhan and the Pager studies. What do both of these studies say about society? And what do these two studies say about bias?
-
10.3 Compute the velocity of transverse wave propagation in a cable of mass density 4 kg/m with a tension of 4500 N.
-
1) Let A=(2,2,3), B = (5,-1,4) and C = (1,7,5). a) Find whether vectors A, B and C are linearly dependent/independent. b) Find ker(M) where columns of matrix M are vectors A, B and C.
-
Doug wants to go into the donut business. For $700 per month he can rent a bakery complete with all the equipment he needs to make a dozen different kinds of donuts (K=l). He must pay unionized donut...
-
April buys some items at a giftshop and writes a check to the shop on her account at Park Bank. Who is the drawee?
-
Strategic Management Dynamic Analysis and assessment of value and control Your proposal to the stakeholders was a success. For the third phase they have asked you to form a Dynamic Analysis and...
-
Aharon and Patricia plan to file jointly and they currently project a taxable income of $142,250. They are in the middle of the 22% tax bracket. They donate a lot of their money to charity so they...
-
The Home Depot is the leading retailer in the home improvement industry and one of the 10largest retailers in the United States. The company included the following on its January 29, 2012, balance...
-
The function P(x) = 95 - 30 log 2 x models the percentage, P(x), of students who could recall the important features of a classroom lecture as a function of time, where x represents the number of...
-
In Exercises 3750, graph each ellipse and give the location of its foci. 9(x - 1) 2 + 4(y + 3) 2 = 36
-
In Exercises 7682, solve by the method of your choice. In how many ways can five airplanes line up for departure on a runway?
-
Answer this letter to Ann Landers: Ive read your column for ages and almost always agree with you. One subject on which we do not see eye-to-eye, however, is senior citizens driving. According to the...
-
Identify the error in Table 3.10, showing consumer prices and the change in prices based on a price index equal to 100 in 2000. Table 3.10 Year Price Index Change from Previous Year Change from 2000...
-
Redo the preceding exercise, this time using the mathematics scores. Preceding Exercise Use the reading comprehension data in Exercise 6.18 to test the null hypothesis that the population mean of X...
Study smarter with the SolutionInn App