ok, i been tryin to get my head around this all weekend but im useless at it. i have the sollution but its saved to my laptop which i left in uni and is now missing!! but im trying to write a program which allows the user to input 3 integers representing angles of a triangle. the java program then outputs wether its an isosceles, rightangled or equalateral triangle. the output i understand. its the user input that i cant get to work. im using Jcreator pro and using "getScannerInput.anInt........" but it wont work!! i would be forever grateful if some1 could help me out wit the script, and i wud finally be able to get some sleep
cheers
gingergib
2
Newbie Poster
Recommended Answers
Jump to PostWhy don't you use javax.swing.JOptionPane.showInputDialog(...)
That takes in a String, then you can just parse it to an int, using
int x=Integer.parseInt(someString);You don't need to input the 3 angles, any 2 will do, then just get program to work out the 3rd.
Jump to Post>getScannerInput.anInt
That doesn't seem like a standard java function? Could be wrong.
All 5 Replies
cms271828
2
Junior Poster
iamthwee
peter_budo
2,532
Code tags enforcer
Team Colleague
Featured Poster
gingergib
2
Newbie Poster
peter_budo
commented:
Right question get fast response, he know it :-)
+2
peter_budo
2,532
Code tags enforcer
Team Colleague
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.