P
P
podde2020-08-18 21:21:38
1C
podde, 2020-08-18 21:21:38

Is the conditional cycle correct?

I'm learning 1C.
There is not enough understanding why the homework was decided by the teacher in this way. It seems to me that he missed something when setting the problem, and I solved according to the conditions, and he solved something of his own ("we write two, three in the mind"). Of course, the point is not in the specific values ​​of the variables, but in the logic itself. For example, why did the solution suddenly go into a Cycle on the counter? I got by without it.
I would be very grateful for any thoughts on this matter.

Exercise:

Создайте переменные – ДвухзначноеЧисло и Степень. Присвойте им определенные
целочисленные значения.
Обеспечьте возведение ДвухзначногоЧисла в Степень. Далее, нужно сообщить получившийся
результат.
Также нужно сообщить превышает ли полученное значение 10 000.

My decision:

5f3c1b3428f2c298611997.jpeg

Teacher's decision:

5f3c1b645e61b636458035.jpeg

I always choose answers-solutions, thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin Nagibovich, 2020-08-19
@podde

But I have not yet reached the understanding of the teacher's logic.
The most confusing line in the Loop
Result = Result * Two DigitNumber

Let's take raising the number 2 to the power of 5 as an example. Here's what it looks like:
Result = 2 * 2 * 2 * 2 *2;
Now try to write it in a loop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question