Question: For this lab you will be creating your own struct, called Frog. You will need to create an array of Frog, and prompt the user

For this lab you will be creating your own struct, called Frog. You will need to create an array of Frog, and prompt the user for information to create Frogs and fill in the array.

(3 pts) First, create a Frog struct (first test). It should have the following fields: Name, Age, and Leg Length. Expect sample input to look like this:

Todd Jones //Name 12 //Age 12.34 //LegLength 

(1 pt) After that, ask the user how many frogs they would like to create:

How many frogs do you want? 

(2 pts) Next, loop for the supplied number of times, asking for user input:

What is the name of Frog 1? What is the age of Frog 1? What is the leg length of Frog 1? What is the name of Frog 2? What is the age of Frog 2? What is the leg length of Frog 2? ... 

(3 pts) After taking the supplied user input and filling out your array of Frogs, loop over the array and print out all your frog data:

Frog Data: Data for Frog Todd Jones: Age: 12 Leg Length: 12.34 ...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!