Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4) Write a program that reads three nonzero double values and determines and prints whether they could represent the sides of a triangle. 5)

 4) Write a program that reads three nonzero double values and determines and prints whether they could  

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.

Step by Step Solution

3.44 Rating (147 Votes )

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

Students also viewed these Programming questions

Question

Solve the equation in the complex number system. x-16x+89=0

Answered: 1 week ago

Question

What are the fourth and fifth dimensions of BIM?

Answered: 1 week ago