There are three kinds of actuaries: those who can count, and those who can't.
Dustin Boor wrote:I'm just learning Java, so try not to get too technical. I'm wondering how I can make my application, so that when a user enters a integer, the application will return the smallest and largest numbers in addition to sum, average, and product.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Durgarao Adari wrote:
Add this block of program.
if(a>b) {
if(a>c) { large=a; small = c; }
else { large=c; small=a;}
}
else {
if(b>c) {large = b; small = c;}
else {large =c; small=b;}
}
System.out.println(large+ " "+ small);
Dustin Boor wrote:Here is my code.
Durgarao Adari wrote:But your post itself is kind of rude being over 7500 posts experience.
Firstly it was too early to ask me to go to other forums me being just one post.
Secondly if you have gone through the all the replies someone (already) pointed that my solution has flaw. You dont have to redo it again. It is duplicating of a post.
And solutions or proposed solutions from every member can not stand as perfect solutions.
My, there's some good stuff thereTobias Bachert wrote:. . .
Dustin Boor wrote:I'm just learning Java, so try not to get too technical
The City calls upon her steadfast protectors. Now for a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|