made it generic with macros.

This commit is contained in:
robin48gx 2017-07-24 09:03:00 +01:00
parent 19d2a52d29
commit 567611d2dc

View File

@ -1,5 +1,12 @@
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\newcommand{\theme}{Macdondalds}
\newcommand{\ttt}{D}
\newcommand{\topname}{Drink}
\newcommand{\mmm}{M}
\newcommand{\midname}{Burger}
\newcommand{\bbb}{F}
\newcommand{\botname}{fries}
%opening
\title{}
@ -10,31 +17,29 @@
\maketitle
\begin{abstract}
This small document un~picks the common
facebook maths picture puzzle. % solution
\end{abstract}
\section{Various themes but always the same hidden multiply: McDonalds maths puzzle etc.}
\section{Various themes but always the same hidden multiply: this one is the {\theme} maths puzzle etc.}
Where $D$ is a drink, $B$ is a burger and $F$ is fries:
Where $\ttt$ is a {\topname}, $\mmm$ is a {\midname} and $\bbb$ is {\botname}:
$$ D + D + D = 30 $$
so $D$ == 10
$$ D + B + B = 20 $$
so $B$ == 5
$$ B + FF + FF = 9 $$
so $FF + FF = 4$ therefore $FF=2$ so $F=\pm \sqrt{2}$
$$ \ttt + \ttt + \ttt = 30 $$
so $\ttt$ == 10
$$ \ttt + \mmm + \mmm = 20 $$
so $\mmm$ == 5
$$ \mmm + \bbb \bbb + \bbb \bbb = 9 $$
so $\bbb \bbb + \bbb \bbb = 4$ therefore $\bbb \bbb=2$ so $\bbb=\pm \sqrt{2}$
Onto the final equation
$$B + F \times D = \; ? $$
As $F$ is $\pm \sqrt{2}$
there are two valid answers
$$\mmm + \bbb \times \ttt = \; ? $$
As $\bbb$ is $\pm \sqrt{2}$ there are actually two valid answers:
$ 5 + \sqrt{2} \times 10 $ and $ 5 - \sqrt{2} \times 10 $
So the answer is either 19.142 or -9.142.
\vspace{0.5cm}
typeset in {\LaTeX} on {\today}.
\end{document}