U
U
UID_B Nintendo2018-05-31 13:51:15
Algorithms
UID_B Nintendo, 2018-05-31 13:51:15

What do these functions do in code?

//------------------------------------------------ --------1
for ( int i=n1; !(n1 % i ==0 && n2 % i ==0); i--);
//------------------------------------------------ --------2
for ( int n=a; n%a!=0 || n%b!=0; n++);

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mercury13, 2018-05-31
@kostyamega8

1. Find "on the forehead" GCD and fuck it.
2. Find "on the forehead" NOC and send it there too.
I repeat, both functions are extremely inefficient, and their result goes nowhere. As soon as the control crosses the semicolon, the variable will disappear.

A
Alexander Ananiev, 2018-05-31
@SaNNy32

These "functions" loop over the variables i and n.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question