This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Own code:Output Confusing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Own code:Output Confusing" Watch "Own code:Output Confusing" New topic
Author

Own code:Output Confusing

Arjun Srivastava
Ranch Hand

Joined: Jun 23, 2010
Posts: 432


Input: 3
Output :how many children do you have 51
your allowance=3900
Input: 5
Output :how many children do you have 53
your allowance=3900
Input: 100
Output :how many children do you have 49
your allowance=14400
Please explain.
Thanks


SCJP 6 | FB : Java Certifications-Help. | India Against Corruption
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3615
    
  14

Take it one step at a time.

1) Print what you want the user to input.
2) Read the user input and parse it to an int.
3) Do the math.
4) Print your output message.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Own code:Output Confusing