(C PROGRAMMING ONLY!) 6. Teaching the Dog To Sit by CodeChum Admin Ever since I was a kid, I've always wanted to see a dog sit because it's so cute ? Let's create a function that lets a dog sit! Instructions: In the code editor, you are provided with the definition of a struct Dog. This struct needs an integer value for its age. Furthermore, in the main, a Dog is already created for you and is passed to a call to a function, sit(). Your task is to declare and define the function sit() which has the following details: Return type - void Name - sit Parameters - 1 Dog Description - prints the message, "Arf arf! My age is and I know how to sit!" Input 1. The age of the Dog Output Enter age of Dog: 3 Arf arf! My age is 3 and I know how to sit!
(C PROGRAMMING ONLY!)
6. Teaching the Dog To Sit
by CodeChum Admin
Ever since I was a kid, I've always wanted to see a dog sit because it's so cute ?
Let's create a function that lets a dog sit!
Instructions:
In the code editor, you are provided with the definition of a struct Dog. This struct needs an integer value for its age. Furthermore, in the main, a Dog is already created for you and is passed to a call to a function, sit().
Your task is to declare and define the function sit() which has the following details:
Return type - void
Name - sit
Parameters - 1 Dog
Description - prints the message, "Arf arf! My age is <AGE_OF_DOG> and I know how to sit!"
Input
1. The age of the Dog
Output
Enter age of Dog: 3
Arf arf! My age is 3 and I know how to sit!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images