# How many sweets did the kind old gentleman have to buy?

A kind old gentleman decided to give 12 sweets to each of the girls in his town and 8 sweets to each of the boys.Of the 612 children in his town, only half the girls and three quarters of the boys took the sweets.**How many sweets did the kind old gentleman have to buy?**

Answer: 3,672.

The actual number of girls and boys doesn’t actually matter!

If all of the children were girls then half of them (306) would be given 12 sweets:

306 x 12 = 3672

If all of the children were boys then three quarters of them (459) would be given 8 sweets:

459 x 8 = 3672

If there were 512 girls (so 256 would get 12 sweets = 3072) and 100 boys (so 75 would get 8 sweets = 600):

256 x 12 + 75 x 8 = 3672

We can change the numbers of girls and boys, but it doesn’t change the answer. The reason for this lies in the fact that 1/2 girls x 12 sweets = 3/4 boys x 8 sweets (both are 6).

## Prashant Pandya View All →

I am a full-stack engineer whose passion lies in building great products while enabling others to perform their roles more effectively. I have architect and built horizontally scalable back-ends; distributed RESTful API services; and web-based front-ends with modern, highly interactive Ajax UIs.

I deal with:

Techniques

Web applications

Distributed architecture

Parsers, compilers

Mobile First, Responsive design

Test-driven development

Using technologies :

+ASP.NET,C#,VB.NET,C++,MS SQL,ADO.NET,WCF ,MVC,Web API

+Java, JAX-RS, JavaScript, Node.js

+Ajax, JSON, HTML5, CSS3

+Mac OS X, Linux, Windows

+Android,iOS

+PhoneGap

My Qualities ,I believe :

Self-directed and passionate

Meticulous yet pragmatic

Leadership skills, integrity