4) Write a program that reads three nonzero double values and determines and prints whether they...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
4) Write a program that reads three nonzero double values and determines and prints whether they could represent the sides of a triangle. 5) Write a program that reads the radius of a circle (as a double value) and computes and prints the diameter, the circumference and the area. Use the value 3.14159 for . 6) Write a program that prints the powers of the integer 3, namely 3, 9, 81, 6561, 43046721, etc. Your while loop should not terminate (i.e., you should create an infinite loop). 7) Write a program that takes an input from user and tells that whether it's a prime number. 8) If cost price and selling price of an item are input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred. 4) Write a program that reads three nonzero double values and determines and prints whether they could represent the sides of a triangle. 5) Write a program that reads the radius of a circle (as a double value) and computes and prints the diameter, the circumference and the area. Use the value 3.14159 for . 6) Write a program that prints the powers of the integer 3, namely 3, 9, 81, 6561, 43046721, etc. Your while loop should not terminate (i.e., you should create an infinite loop). 7) Write a program that takes an input from user and tells that whether it's a prime number. 8) If cost price and selling price of an item are input through the keyboard, write a program to determine whether the seller has made profit or incurred loss. Also determine how much profit he made or loss he incurred.
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
-
Imagine that Costco has $500,000 of sales (selling 31,250 units) in August and has a contribution margin ratio of 40% and fixed costs of $20,000. If sales in units increase by 15% in September, what...
-
Solve the equation in the complex number system. x-16x+89=0
-
Roasters Limited is a coffee-blending firm. It produces a special blend of coffee known as "Utopia Blend" by mixing two grades of coffee "AB" and "QP" as follows: Material AB QP Standard mix ratio AB...
-
Iridium is not the heaviest atom found in nature. What, then, accounts for a chunk of pure iridium being the densest substance on Earth?
-
What is a suspense account? Is it necessary that is suspense account will balance off after rectification of the errors detected by the accountant? If not, then what happens to the balance still...
-
With reference to Example 15, (a) find the least squares line for predicting the chromium in the effluent from that in the influent after taking natural logarithms of each variable; (b) predict the...
-
The following events concern Anita LeTourneau, a Manitoba law school graduate, for March 2021: 1. On March 4, she spent $20 on a lottery ticket. 2. On March 7, she won $250,000 in the lottery and...
-
comments about these post? 1. The bullwhip effect is a word used to explain a situation in supply chain management where minor consumer demand changes can cause intense fluctuations in demand...
-
Analysis and evaluation: Identify the control deficiencies in the payroll process for The Vane Corporation. Recommend the changes necessary to improve the control structure. Arrange your answer in...
-
What's causing errors in an Eclipse-specific for java? This is how the code looked when it was working: Now it looks like this, notice the change in colors for example in args. What caused this? and...
-
3. You purchased a 3 year coupon bond one year ago. Its par value is $1,000 and coupon rate is 6%, paid annually. At the time you purchased the bond, its yield to maturity was 6.5%. Suppose you sell...
-
Discuss the following topic(s) in the forum and submit proof of your participation in the online discussions: 1) Professional certification and the practising accountants 2) Cost data and managerial...
-
G is an individual GST registrant that files GST returns annually. At the beginning of year 20XX, G incorporated their sole proprietorship into G Inc., a wholly owned subsidiary of G, and registered...
-
"Managing Away Bad Habits Team Assignment Organizational Behavior IILeadership Assigned is ashort case from the exercise Managing Away Bad Habits. The task is to develop a turnaround strategy for...
-
18 years ago, I purchased 185 shares of a stock worth $14.25 per share. There was a 2:1 split, a 4:1 split, and a 3:1 split during that time period. Today the stock is worth $1.53 per share. If the...
-
What is an organization that controls project managers, documentation, and policies called? a. Project Management Office b. Strong matrix c. Functional d. Pure project
-
B made an issue of 150,000 $1 ordinary shares at a premium of 20% the proceeds of which is received by cheque. What is the correct journal to record this? A. Bank Share capital Share premium B. Bank...
-
Write a program that prompts the user to enter an integer from 1 to 15 and displays a pyramid, as shown in the following sample run: Enter the number of lines: 7 JEnter 1. 2 1 2 3. 3. 4 4 4 4 4 1. 1....
-
Coupon collector is a classic statistics problem with many practical applications. The problem is to pick objects from a set of objects repeatedly and find out how many picks are needed for all the...
-
Write a recursive method to return the number of uppercase letters in a string. Write a test program that prompts the user to enter a string and displays the number of uppercase letters in the string.
-
\(X\) is the number of bits in error in the next four bits transmitted. What is the expected value of the square of the number of bits in error? Now, \(h(X)=X^{2}\). Therefore, \[ \begin{aligned}...
-
Data 2.7 on page 95 introduces the dataset HollywoodMovies, which contains information on more than 900 movies that came out of Hollywood between 2007 and 2013. One of the variables is the budget (in...
-
Correlation between height and weight for players on the 2014 Brazil World Cup Team, using data from all 23 players on the roster. State whether the quantity described is a parameter or a statistic...
Study smarter with the SolutionInn App