1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Len [333]
3 years ago
10

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 a

long 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?
Mathematics
2 answers:
zloy xaker [14]3 years ago
5 0
As many were opened during the time period. Jk, I don't know. This is a hard one
FinnZ [79.3K]3 years ago
5 0
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


You might be interested in
What are the differences between a translation rotation and reflection
soldi70 [24.7K]

A translation moves the graph

A rotation spins it

A reflection flips it

3 0
3 years ago
Read 2 more answers
How do you solve 2x+4=7
marissa [1.9K]
2x+4=7  subtract 4 from both sides

2x=3  divide both sides by 2

x=3/2

x=1.5


8 0
3 years ago
Please help me with this?
emmasim [6.3K]

Answer:

2

Step-by-step explanation:

4 0
3 years ago
Can someone please help me
devlian [24]
I believe it's the same as adding 8+3, but you add the negative sign to your answer
so 8+3 = (-?)
7 0
3 years ago
The table shows how Mura spends her free time on a typical Saturday.if she has 6hours of free time how many hours does she spend
ycow [4]

undefined

3 0
1 year ago
Other questions:
  • 2xp+3y=10 Solve for x
    13·1 answer
  • To which subsets of real numbers does the number -22 belong? Choose all that apply.
    14·1 answer
  • Solution to the equation x/3+ x/6=7/2
    15·2 answers
  • Yo The digit 6 in the number 406,000 is how many times greater than the digit in 400,060
    7·2 answers
  • I am at my office AND not working 2\%2% of the time. I am at my office 10\%10% of the time. What is the conditional probability
    14·1 answer
  • What is 7 1/2 + (-8/9)
    11·2 answers
  • What is the value of f(−1) when f(x)=2x+2
    12·1 answer
  • This question is designed to be answered without a calculator. Use the antiderivative formula shown, where f(u) represents a fun
    6·1 answer
  • Please help, I have ask it 5 times. Please.
    11·2 answers
  • What is an equation of the line that passes through the points (-4, -5) and (-2, -6)?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!