Answer the question
In order to leave comments, you need to log in
Did I solve the problem from VK correctly?
I came across this picture in contact:
In general, I counted the number of options (512) and I even wanted to count manually. I decided to write a C program that will go through all the options, and if a suitable combination comes out, it will display it on the screen.
Here's what I got:
#include <stdio.h>
int main()
{
int arr[8];
int i, j, k, res;
for(i = 0; i < 8; i++){
printf("Enter Arr[%d]\n", i);
scanf("%d", &arr[i]);
}
for(i = 0; i < 8; i++){
printf("%d\n", arr[i]);
}
for(i = 0; i < 8; i++){
for(j = 0; j < 8; j++){
for(k = 0; k < 8; k++){
res = arr[i] + arr[j] + arr[k];
printf("%d + %d + %d = %d\n", arr[i], arr[j], arr[k], res);
if( (arr[i] + arr[j] + arr[k]) == 30 ) printf("First = %d\n Second = %d\n Third = %d\n", arr[i], arr[j], arr[k]);
}
}
}
return 0;
}
Answer the question
In order to leave comments, you need to log in
Is it just me or adding 3 odd numbers will give an odd number anyway?
At first glance, everything is correct.
PS In my opinion, the problem does not have a head-on solution and it seems that additional actions (calculations in brackets, for example, or factorial) are not enough
I remember there are three options
1) add decimal 13.1, etc.
2) turn over the 9-ku
3) write 3 and another 3, only mirrored in the first square (it will be 8)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question