i need help writing a program that asks the user to enter an objects mass, and then calculates its weight
object> 1000 newtons display a message that it is to heavy
object<10 newtons display indiccating that it is to light
weight = mass x 9.8

Recommended Answers

All 2 Replies

Post the code that you have so far. It's a straightforward program which asks for input, calculates the result, and prints the output.

Here's how to ask for input:
Built-in functions
Look down the page... there are two input methods. See if you can find them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.