Life.src
Me: Hey there. One question: how did your test go?
Funny Person: It was okay.
Me: Vague.
Funny Person: As in, it was neither good nor bad.
Me: You are rationalising. Be specific.
(Funny Person has gone offline)
Finding the Number of zeroes in the product of all numbers between 1 and 100

rahuljose:

I am sure there is a simpler mathematical solution but this is good enough for now I have always been a brute force guy sadly

#include<stdio.h>
void main()
{
int i;
long double p=1;
for(i=1;i<101;i++)
{
p=p*i;
}
printf("Product of all numbers between 1&100 is %LG \n",p);
}


No Compiler installed no issues head to http://codepad.org/

PS:-

The answer is 152 zeroes.

My takeaway from this is the printf Format placeholder for Long Double-%LG


Actually, there is a better (and more accurate way.

Note that your double isn’t large enough to hold a value as large as 100!, neither is the unsigned long. But Java does have the BigNumber object that can be used to store numbers larger than you can imagine.
[EDIT] I’m not sure about this. I didn’t remember the long double extended-precision format. Assumed it was 64-bits like the double. Rahul pointed out that it was indeed capable of storing values as large enough as 100!


What you’d have to do in C is to keep an array to keep track of all those digits and then perform the computation as if you were writing it down on pen and paper, take each thing one-by-one and multiply. I will work on a possible solution to this.

EPIC WOW.

I’m going to be following Pranav and everything he does from now on.

rahuljose:

:) Great take on Apple’s Advertising Loved it

Brilliant. Simply brilliant.

How To UnForget
me: Congratulations.
Sobby: For what?
me: For not saying hey-hi-hi-hey for the past week and then disappearing into thin air.
Sobby: Oh well, I've been busy.
me: Really, with what?
Sobby: You know, stuff.
me: What stuff?
Sobby: Assignments and work.
me: What assignments? they didn't demote you at work, did they? Send you back to school?
(Sobby is typing)
me: Oh wait, I remember, you're doing your MBA course right? I forgot you'd joined that weekend course.
(Sobby finishes typing)
Sobby: I'm doing my PGDBM in Josephs.
me: It is most unfunny when I forget something, and then remember it the second I mention that I've forgotten it.
(Sobby disappears into thin air)
List.

hrrrthrrr:

I have never really been into new years resolutions and such so instead I am working on a “25 things to do before I turn 26” list. I have a bunch already but what would you suggest?

Have no reason to make a 26 things to do before I turn 27 list. That should sum it up.
Number Pyramid.

I joined Java Ranch today. This is a screenshot I took to help answer a query on the forums.

Somebody needed help with a number pyramid. :-)

This required a lot of tweaking of code.

Number Pyramid.

I joined Java Ranch today. This is a screenshot I took to help answer a query on the forums.

Somebody needed help with a number pyramid. :-)

This required a lot of tweaking of code.

me: Unfunny is like money,
me: When you've got too much,
me: Requesting an autocomplete on that...
Witty Friend: oh. You should complete that. I'm felling mildly nostalgic for Manu's Bad Rhymes.
me: You can buy such and such,
me: And all the vavoom women with the longest legs,
me: Will call you "Honey!"
me: And love you very very much.
Witty Friend: Hm. Still got it.

It’s Not Fair by Lily Allen

I don’t know if she’s British, but she’s fairly frowny in this video. The ‘nought’ gives it away. :-)

And I like the 70s talk show look.

There’s an autocomplete meme!

I’ll say that again:

There IS an autocomplete meme!

Thanks @g0

Also, as my very smart and very funny and very witty friend would like to point out, this is her pick of the whole lot.

I just giggled through the list.