Write 24 using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers.
int main()
{
int a, b, c, d, answer;
a = 1;
b = 3;
c = 4;
d = 6;
answer = a/b + c*d;
printf("The answer is %d\n",answer);
}
// output: The answer is 24
It does say “write.”"Write 24 using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers."
AI solutions allowed?:
Screen Shot 2019-06-15 at 3.32.51 PM.png
I would have concerns about the run-time efficiency. Do the strings use hashing?In Mathematica:
StringJoin[ToString[1*6/3], ToString[4]]
24
I would have concerns about the run-time efficiency. Do the strings use hashing?In Mathematica:
StringJoin[ToString[1*6/3], ToString[4]]
24
What about a least-squares optimisation problem?Write 24 using 1, 3, 4 and 6 and +, -, * or / operators. You have to use all 4 numbers.