Ask Question
7 July, 00:35

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.

+2
Answers (1)
  1. 7 July, 04:35
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers