. Weird Treasure Chest by CodeChum Admin I'm now in the middle of the jungle when I saw this weird treasure chest. It seems that if I properly place the address of a certain number, I get a very weird result! Instructions: In the code editor, you are provided with a treasureChestMagic() function which has the following description: Return type - void Name - treasureChestMagic Parameters - an address of an integer Description - updates the value of a certain integer randomly You do not have to worry about how the treasureChestMagic() function works. All you have to do is ask the user for an integer and then call the treasureChestMagic() function, passing the address of that integer you just asked. Finally, print the updated value of the integer inputted by the user. Input 1. An integer Output Enter n: 10 Treasure Chest Magic Result = 13
(C PROGRAMMING ONLY)
2. Weird Treasure Chest
by CodeChum Admin
I'm now in the middle of the jungle when I saw this weird treasure chest.
It seems that if I properly place the address of a certain number, I get a very weird result!
Instructions:
In the code editor, you are provided with a treasureChestMagic() function which has the following description:
Return type - void
Name - treasureChestMagic
Parameters - an address of an integer
Description - updates the value of a certain integer randomly
You do not have to worry about how the treasureChestMagic() function works. All you have to do is ask the user for an integer and then call the treasureChestMagic() function, passing the address of that integer you just asked.
Finally, print the updated value of the integer inputted by the user.
Input
1. An integer
Output
Enter n: 10
Treasure Chest Magic Result = 13
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images