There is a school with 1,000 students and 1,000 lockers. On the first day of term the headteacher asks the first student to go along and open every single locker, he asks the second to go to every second locker and close it, the third to go to every third locker and close it if it is open or open it if it is closed, the fourth to go to the fourth locker and so on. The process is completed with the thousandth student. How many lockers are open at the end?

Answers

Answer 1
Answer: As many were opened during the time period. Jk, I don't know. This is a hard one
Answer 2
Answer: Hello,

answer: 31

I have make a programm in Qbasic

CONST Faux = 0
CONST Vrai = NOT (Faux)
CONST nb = 1000
DIM SHARED locker(nb) AS INTEGER
DIM i AS INTEGER, j AS INTEGER, answer AS INTEGER
'1 first student
FOR i = 1 TO nb: locker(i) = Vrai: NEXT i: ' CALL See
'2 2nd student
FOR i = 2 TO nb STEP 2: locker(i) = Faux: NEXT i: 'CALL See
FOR j = 3 TO nb
    FOR i = j TO nb STEP j
        locker(i) = NOT (locker(i))
    NEXT i
    'CALL See
NEXT j
answer = 0
FOR i = 1 TO nb
    IF locker(i) THEN answer = answer + 1
NEXT i
PRINT "answer="; answer
END

SUB See

SHARED locker() AS INTEGER
DIM i AS INTEGER
locker(0) = 0
FOR i = 1 TO nb
    PRINT locker(i);
    IF locker(i) THEN locker(0) = locker(0) + 1
NEXT i
PRINT locker(0)

END SUB



Related Questions

Simplify and solve this equation: 4m + 9 + 5m – 12 = 42.A. m = -4B. m = 4C. m = –5D. m = 5
Which equation is equivalent to the equation 6x + 9=12
The domain of a function is given by {-4,2,8}. If the function is defined by y= x +1 /3 ,then which of the following values is a member of the range?
Find the missing value to the nearest hundredth. COS x = 7/14 *
For a button to fit through its buttonhole, the hole needs to be the size of the button's diameter. Whatsize buttonhole is needed for a button with a circumference of 7.38 centimeters? (Use the value of 3.14 to represent pi.) A. 2.35 centimeters B. 1.14 centimeters C. 5.14 centimeters D. 3.69 centimeters

Please help me with the question below! its due in 10 minutes!
thank you sm!

Answers

Answer:

To find the composite function (f ◦ g)(x), we need to substitute g(x) into f(x) and simplify.

Given:

f(x) = x

g(x) = -2x + 3

To find (f ◦ g)(x), we substitute g(x) into f(x):

(f ◦ g)(x) = f(g(x))

Substituting g(x) into f(x), we get:

(f ◦ g)(x) = f(-2x + 3)

Since f(x) = x, we replace f(-2x + 3) with (-2x + 3):

(f ◦ g)(x) = -2x + 3

Therefore, the composite function (f ◦ g)(x) is -2x + 3.

the ratio of red marbles to green marbles is 3 to 5. which situation follows this ratio? 70 red marbles and 42 green marbles 9 red marbles and 24 green marbles 51 red marbles and 85 green marbles 30 red marbles and 18 green marbles

Answers

3/5 = 51/85

Therefore, 51 red marbles and 85 green marbles follows the required ratio.

Answer with explanation:

Ratio of red marbles to green marbles is equal to (3)/(5)

Now starting from Options given

1.(70)/(42)=(5)/(3)\n\n2.(9)/(24)=(3)/(8)\n\n3.(51)/(85)=(3)/(5)\n\n4.(30)/(18)=(5)/(3)\n\n\text{Option C}\rightarrow (51)/(85)

Lucy correctly answered 70% of the questions on her science homework. She counted 14 correct answers. How many questions are there on her homework?

Answers

Answer:

9.8

Step-by-step explanation:

What is a 2c − 5b − c a − b simplified?

Answers

All you have to do is combine like terms. 2c and (-c) are like terms (-5b) and (-b) are like terms and a is a term. So, 2c combined with (-c) is C. (-5b) and (-b) combined is (-6b). Since a doesnt need to be combined with anything, you leave it as it is so your answer will then be c - 6b + a (this is the answer assuming that there is a + in front of the a. If there is a - sign, then just change your +a to -a at the end

Round 496.739386253 to the nearest whole number.

Answers

Answer:

497

Step-by-step explanation:

If x ≥ 5, we round up.

If x < 5, we round down.

Since 7 ≥ 5, we round 496.739386253 to 497.

Answer:

467

Step-by-step explanation:

7 is greater than 5 so the six is rounded to a 7

Hope this helped please mark me brainiest

Which of the following are the factors of q3 – q2 + 2q – 2?

Answers

Hello,

q^3-q²+2q-2=q²(q-1)+2(q-1)=(q-1)(q²+2)