C++
Lab 22 - Walnut
Top of Form
Bottom of Form
Content
·
Walnut. A tough nut to crack!
Attached Files:
·
walnut.h (94 B)
Walnut. It's a tough nut to crack!
This lab is in two parts.
Part 1
Write a program that creates three integers and passes them to the walnut function. The walnut function is declared like this:
void walnut(int* first, int* second, int* third);
Print out your integers both before and after you call the function. Your integers will have changed!
Part 2
Write a function called peanut. Your peanut function should reproduce the behavior of walnut. Once you have written your function you can test it by adding the name of your function as a fourth argument to walnut. For example:
void peanut(int* first, int* second, int* third)
{
//your code
}
int main()
{
//...
walnut(/*your three integers*/, peanut);
}