Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!