Computer Science, asked by sidslash1456, 6 months ago

A miner is looking for diamonds in an underground mine. He is standing in front of 7 tunnels. Only one of these tunnels lead him directly to the diamonds. Write a program that searches for diamonds in these tunnels. The program should accept whether there are diamonds in a particular tunnel or otherwise after the miner enters the tunnel. If the miner has found the diamonds, he need not search the remaining tunnels. The program should display the number of tunnels that the miner searched before finding the diamonds. Hint: To compare strings, use (String 1).equals(String 2).

Answers

Answered by Itzabhi001
1

Explanation:

miner is looking for diamonds in an underground mine. He is standing in front of 7 tunnels. Only one of these tunnels lead him directly to the diamonds. Write a program that searches for diamonds in these tunnels. The program should accept whether there are diamonds in a particular tunnel or otherwise after the miner enters the tunnel. If the miner has found the diamonds, he need not search the remaining tunnels. The program should display the number of tunnels that the miner searched before finding the diamonds. Hint: To compare strings, use (String 1).equals

Answered by princeameta2882007
13

Explanation:

Relatively costly and frequently used to get to deeper deposits, underground mining involves digging down into the earth and creating tunnels and shafts that reach the deposits of resources. Ore and other resources can then be brought up to the surface for processing, while waste rock can be removed for disposal.

Hope it's helpful for you

Similar questions