DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Java (http://www.daniweb.com/forums/forum9.html)
-   -   Need some tips.. (http://www.daniweb.com/forums/thread92575.html)

iCez Oct 11th, 2007 9:29 am
Need some tips..
 
Here it goes, we were told to make a Multiplication thingy that the user can Input something like 5x5 and then the output will be the answer. We were not taught on how to do it yet so I don't have any idea. I'm just hoping that someone can teach me on what statement will I use so that I can study it in advance and so that I can start it coz its out project. >.<

ithelp Oct 11th, 2007 11:41 am
Re: Need some tips..
 
You can use expr to calculate value.

Ezzaral Oct 11th, 2007 12:21 pm
Re: Need some tips..
 
Quote:

Originally Posted by iCez (Post 449055)
Here it goes, we were told to make a Multiplication thingy that the user can Input something like 5x5 and then the output will be the answer. We were not taught on how to do it yet so I don't have any idea. I'm just hoping that someone can teach me on what statement will I use so that I can study it in advance and so that I can start it coz its out project. >.<

For input you will most likely use Scanner.

iCez Oct 11th, 2007 1:13 pm
Re: Need some tips..
 
aww.. I can't figure it out yet. I guess I have to search more. xD uhmmm.. do you have some easy guides or examples? :D

Ezzaral Oct 11th, 2007 1:18 pm
Re: Need some tips..
 
What can't you figure out? You didn't actually ask anything specific - just "on what statement will I use", which is incredibly vague. I assumed you didn't know how to get the input, since the rest is almost no effort, so I pointed you to the Scanner for collecting the input.

If you have a specific question then state it clearly.

iCez Oct 11th, 2007 2:24 pm
Re: Need some tips..
 
ok here's the questions that keep running on my mind.

1. what will i use for the input (you already gave me the link, i'll just need to search for more examples for it.)
2. what will i use for the output (a formula or something). example when the user inputs 5x5, how can i make the answer "25" appear.

Ezzaral Oct 11th, 2007 2:32 pm
Re: Need some tips..
 
1. There is an example right near the top of using it to read from console input. I have a hard time believing your teacher has not covered input at all yet though if they have assigned this project.
2. Yes, a method is just like a formula. It can take inputs, do something with them, and return an output. This part should be glaringly simple if you have followed anything in class so far.


All times are GMT -4. The time now is 5:04 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC