how do i write a program that a user can input 3 numbers (between 0 and 100), then the program will compare if the numbers are bigger are smaller than each other, and weather each number is smaller than 100 or greater than 0. required 2 class file in one file ( first class will take the input numbers and pass them into the second class to compare). Thanks alot.
blazinhieu
0
Newbie Poster
Recommended Answers
Jump to PostWith a text editor and a jdk.
Jump to PostScanner class for reading input from keyboard. Search the forum for examples or look the API.
Or, use the args[] and enter the values from the command prompt.If statements to check if it is between 0 and 100 and print error message and return.
One class will …
All 7 Replies
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
apegram
commented:
Excellent!
+1
blazinhieu
0
Newbie Poster
javaAddict
900
Nearly a Senior Poster
Team Colleague
Featured Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
blazinhieu
0
Newbie Poster
javaAddict
900
Nearly a Senior Poster
Team Colleague
Featured Poster
stultuske
1,116
Posting Maven
Featured Poster
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.