Ask Question

Design a program that asks the user to enter an objects mass, and then calculates its weight. if the object weighs more than 1,000 newtons, display a message indicating that it is too heavy. if the object weighs less than 10 newtons, display a message indicating that it is too light.

+3
Answers (1)
  1. 15 January, 23:55
    0
    Import java. util. Scanner; public class WeightMeasure { public static void main (String[] args) { Scanner input = new Scanner (System. in);

    System. out. print ("Enter weight of object in newtons: "); double weight = input. nextDouble (); if (weight > 1000) { System. out. println ("Object is too heavy"); }else if (weight < 10) { System. out. println ("Object is too light"); } }}
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Design a program that asks the user to enter an objects mass, and then calculates its weight. if the object weighs more than 1,000 newtons, ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers