Create a java program that will accept an integer and character. If the user input 'A',...
Fantastic news! We've Found the answer you've been seeking!
Question:
![](https://dsd5zvtm8ll6.cloudfront.net/questions/2024/04/66127b15cdbb3_1712490690677.jpg)
Transcribed Image Text:
Create a java program that will accept an integer and character. If the user input 'A', compute and display the sum of 10 integers else display "Invalid Character". run: Enter a letter: a Enter a number: 1 run: Enter a letter: A Enter a number: 5 Enter a number: 2 Enter a number: 6 Enter a number: 3 Enter a number: 9 Enter a number: 4 Sample output: run: Enter a number: 5 Enter a number: 6 Enter a number: 7 Enter a number: 8 Enter a number: 9 Enter a number: 10. The sum of 10 integer is: 55 BUILD SUCCESSFUL (total time: 11 seconds) Enter a letter: Invalid Character! Enter a number: 1 Enter a number: 2 Enter a number: 7 Enter a number: 11 Enter a number: 18 Enter a number: 52 Enter a number: ho The sum of 10 integer is: 121 BUILD SUCCESSFUL (total time: 15 seconds) BUILD SUCCESSFUL (total time: 7 seconds) Activate Windows Go to Settings to activate Create a java program that will accept an integer and character. If the user input 'A', compute and display the sum of 10 integers else display "Invalid Character". run: Enter a letter: a Enter a number: 1 run: Enter a letter: A Enter a number: 5 Enter a number: 2 Enter a number: 6 Enter a number: 3 Enter a number: 9 Enter a number: 4 Sample output: run: Enter a number: 5 Enter a number: 6 Enter a number: 7 Enter a number: 8 Enter a number: 9 Enter a number: 10. The sum of 10 integer is: 55 BUILD SUCCESSFUL (total time: 11 seconds) Enter a letter: Invalid Character! Enter a number: 1 Enter a number: 2 Enter a number: 7 Enter a number: 11 Enter a number: 18 Enter a number: 52 Enter a number: ho The sum of 10 integer is: 121 BUILD SUCCESSFUL (total time: 15 seconds) BUILD SUCCESSFUL (total time: 7 seconds) Activate Windows Go to Settings to activate
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 programming questions
-
Unit Cost Analysis Crown Trophies Inc. uses a job order cost system for determining the cost to manufacture award products ( plaques and trophies ) . Among the company's products is an engraved...
-
Could you please help complete the following java code. Help is needed where //*** is throughout the code. import java.util.Arrays; import java.util.Random; import java.util.Scanner; // // Project 3...
-
Need help getting the solution to this java code. Need help where //*** is marked throughout the code. Thanks! import java.util.Arrays; import java.util.Random; import java.util.Scanner; public class...
-
The monochromatic emissivity of a diffuse-surface at 1600 K varies with wavelength in the following manner : = 0.4 for 0
-
In the VAX computer, user page tables are located at virtual addresses in the system space. What is the advantage of having user page tables in virtual rather than main memory? What is the...
-
What is cellular manufacturing? (LO 5)
-
What is the probability that neither the first- nor the second-worst team will get the first pick? Take this quiz as you would take a quiz in class. After you are done, check your work against the...
-
Sales during the year were 500 units. Beginning inventory was 200 units at a cost of $5 per unit. Purchase 1 was 250 units at $6 per unit. Purchase 2 was 400 units at $7 per unit. Required: Calculate...
-
#3 Sheridan Company is the creator of Y-Go, a technology that weaves silver into its fabrics to kill bacteria and odor on clothing while managing heat. Y-Go has become very popular in undergarments...
-
Determine by direct integration the centroid of the area shown. Express your answer in terms of a and b. * = ky2 9.
-
Choose the correct option. The accounts receivable clerk processes: OPTIONS Invoices to customers Invoices from vendors Payments to employees All of the above
-
15.5 please help will give like if answers r correct Exercise 15-8 (Static) Sales-type lease with selling profit; lessor; calculate lease payments [LO15-3] Manufacturers Southern leased high-tech...
-
When my son was young, he had 8 different plastic dinosaurs to arrange. How many ways could he arrange his 8 dinos? He had favorite dinos, so placing them in proper order was very important. How many...
-
Process P1 init (mutEx); num = 0; loop1 = 0; while (loop1 < 3) wait (mutEx); num num + 1; signal (mutEX); loop1 loop1 + 1; Process P2 loop2 = 0; while (loop2 < 2) wait (mutEx); num num + 10;...
-
PROBLEM 3-5B Following is the chart of accounts of Smith Financial Services: Assets 111 Cash 113 Accounts Receivable 115 Supplies 117 Prepaid Insurance 124 Office Furniture Liabilities 221 Accounts...
-
4. Identify a service you could refer Casey to and write a referral for her (up to 300 words).
-
1 Use the following information on states of the economy and stock returns to calculate the expected return for Dingaling Telephone: (Do not round intermediate calculations. Enter your answer as a...
-
Compare and contrast debt financing and equity financing as ways of starting a new business. Does one have an overall advantage over the other? What situation is more favorable to the use of debt...
-
Lyndon Company has forecast earnings of $2 million, $4 million, and $6 million, respectively, at the end of the next three years. What is the anticipated accumulated value of these earnings at the...
-
Obama Ltd has made an investment that is expected to generate a cash flow of $20,000 each year for the next five years. If Obama uses a discount rate of 5% on this investment, the present value of...
-
Bill has funded a retirement investment with $250,000 earning a return of 5.75%. What is the value of the payment that Bill can receive in perpetuity (to the nearest dollar)? a. $12,150 b. $13,250 c....
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App