![]() |
|
#1
|
|||
|
|||
urgent help!!arrays-float+doublehi everyone!!i have a homework and i dunno what to do...
we are supposed to write a code in c that inputs two integers 1 to 250 digits and output their multipication, but th thing is we're not allowed to use words "float" and "double" in our codes!!! |
|||
|
#2
|
|||
|
|||
Re: urgent help!!arrays-float+doubleQuote:
Why would you need float or double in integer multiplication? I guess that it is "urgent" that you read the guidelines for posting help requests. ...this post looks remarkably similar to several others of the same ilk all from different user names who post one question and never return. Are you screwing around with us or is this a sincere user request? --never any code --always urgent/in a hurry --never capitalizes "i" and other parts of sentences --overuses punctuation --runs words in sentences together I think we're being "had" by some prankster. :davis: |
|
#3
|
||||
|
||||
Re: urgent help!!arrays-float+doubleQuote:
If so, set up three arrays of at least 250 integers. Input your integers one digit per array element. You take it from there, and please read the Guidelines, especially #1, #2, #5, #9 __________________
The 3 Laws of the Procrastination Society: 1) Never do today that which can be put off until tomorrow 2) Tomorrow never comes |
|
#4
|
|||
|
|||
Re: urgent help!!arrays-float+doubleQuote:
It seems like you're assuming that the total digits of the two numbers multiplied together won't exceed 250 digits...by your "three" arrays of at least 250 integers each. That is, if the third array is to be used for the "result" digits. If we were to "scale down" the requirement to a maximum of two digits per operand, and we had input of: 10 x 10, the output array very likely needs to be a bit larger than the int[2], yes? If you were to implement such a solution using int arrays: digits_1[2], digits_2[2] and result[2]...the above example would wipe out your storage because each digit of the answer (100) could not be held in the 2 elements of the array. In fact, if the two sets of two digits were 99 x 99 wouldn't the appropriate answer be 9801...thus requiring 4 digits to be held in the output array? If you had another plan for the third array of at least 250 integers, what was it to be used for? I definitely don't want to stiffle your creativity, so if you're really just brainstorming and kicking ideas around, that's fine. Just say so. :davis: |
|
#5
|
||||
|
||||
Re: urgent help!!arrays-float+doubleUp until recently, we've pointed to solutions, not given them full working code. It allows them to think a little on their own, and do most of the solution themselves. Since we don't get the grade for their project, the incentive for us is to help them solve it, not give them the solution.
And at least seems to cover your objection perfectly. He might need more than 250 __________________
The 3 Laws of the Procrastination Society: 1) Never do today that which can be put off until tomorrow 2) Tomorrow never comes |
|
#6
|
|||
|
|||
Re: urgent help!!arrays-float+doubleQuote:
No objection from me WaltP...and I have no idea where you even got such a notion that I was objecting to your reply. However, I don't think that the word "perfectly" applies here. You seem to be saying that the third array must be at least 250 integers. However, I thought that I pointed out that an entry of 99 x 99 would only require a maximum of 4 digits...assuming, of course, that the result was stored in the third array a digit per. What plan did you have for the other 246 ints that you say are the least number necessary? And what of 1 x 0 entered? or -1 x -1? :davis: |
|
#7
|
|||
|
|||
Re: urgent help!!arrays-float+doubleQuote:
WaltP, you present this "us" and "them" and "we" thing in such a way that I wanted to comment in a more suitable www.gidforums.com. I invite your comments. :davis: |
Recent GIDBlog
Install Adobe Flash - Without Administrator Rights by LocalTech
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Canny edge detector | Skm | Java Forum | 1 | 01-Jan-2006 06:51 |
| Powell Method | EngineerFORhire | C Programming Language | 5 | 01-Oct-2005 00:34 |
| Double output | leanieleanz | C++ Forum | 1 | 11-Mar-2005 20:19 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The