#Java Code large number multiplication algorithm with a divide and conquer algorithm
1 messages ยท Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
Please don't ask to ask, nor only say hello, just ask your actual question right away, thanks 
If you want to read about the details of why this is better, check out:
https://dontasktoask.com/
im really sorry for many times my english bad and im new for this discord
no worries
just tell us whats unclear to u, or what question u have, and then someone will try to answer ๐
yeah thank u very much
I have a question about java coding about Pseudo-code of large number multiplication algorithm with divide and conquer algorithm and I have a picture if someone can help me and teach me about this coding, I'm very grateful because I don't really understand java coding yet
and this picture i told
so whats ur question? is something in the picture unclear? what exactly?
what dont u understand?
yeah idk how to start
well, code it step by step
cause i really confuse about it
about what
I have this Java coding and I don't know what steps I should do again and are there any errors regarding my coding. Previously, thank you very much for helping me and sorry if I wasn't clear enough to explain it.
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐
okay. first of all, ur supposed to create one method. not two
lets look at the picture
ur supposed to create one method, called Kali2
it takes 3 parameters
long x, long y, int n
and it returns long
so write that now
u can keep its content empty for a moment
just the method itself without body. and then share it
wait i'll try
may I ask again, is the method void or long?
like this?
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐
yes, good ๐
now the body
this is the body:
first of all, u see that:
if ... then
foo
else
bar
endif
so. java has that as well, if-else
write that in ur method now
one big if-else
whats unclear to u?
just write an if else
without body for now
just the if else
in my country if someone teaches you something you should say this as thanks for teaching you something and i say this to you
oh okay, ur welcome ๐
like this?
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐
yes, very good
only the else part missing
<- means =
so like int s = n / 2;
the 10^s u can do with Math.pow(10, s)
is there any other way besides using math.pow? because my class is not there yet and my lecturer might get it wrong if i use math.pow
no
u can create a method that multiplies 10 * 10 * ... in a loop
i guess
i apologize in advance. is it correct to use divide and conquer algorithm?
i dont understand
I apologize in advance because you don't understand. As I said earlier, in the photo I sent it is a large number multiplication algorithm with a divide and conquer algorithm and what I am asking is whether the coding you taught me uses the divide and conquer algorithm?
like this?
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐
this for the new result
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐
the divide and conquer part is the actual algorithm, the method ur writing
has nothing to do with the power thing
try out ur pangkat method
don't just code. constantly try it out
otherwise u end up with a big mess full of bugs
the pangkat method doesn't work at all right not. u have to fix it
I'm really sorry for not replying to your messages for a few hours because I fell asleep. This is for the coding I just made again
I uploaded your attachments as gist. That way, they are easier to read for everyone, especially mobile users ๐