Answered step by step
Verified Expert Solution
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 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started