subject
Computers and Technology, 03.03.2020 16:57 zazy15

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?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
)a grad student comes up with the following algorithm to sort an array a[1..n] that works by first sorting the first 2/3rds of the array, then sorting the last 2/3rds of the (resulting) array, and finally sorting the first 2/3rds of the new array. 1: function g-sort(a, n) . takes as input an array of n numbers, a[1..n] 2: g-sort-recurse(a, 1, n) 3: end function 4: function g-sort-recurse(a, `, u) 5: if u ⒠` ≤ 0 then 6: return . 1 or fewer elements already sorted 7: else if u ⒠` = 1 then . 2 elements 8: if a[u] < a[`] then . swap values 9: temp ↠a[u] 10: a[u] ↠a[`] 11: a[`] ↠temp 12: end if 13: else . 3 or more elements 14: size ↠u ⒠` + 1 15: twothirds ↠d(2 ◠size)/3e 16: g-sort-recurse(a, `, ` + twothirds ⒠1) 17: g-sort-recurse(a, u ⒠twothirds + 1, u) 18: g-sort-recurse(a, `, ` + twothirds ⒠1) 19: end if 20: end function first (5 pts), prove that the algorithm correctly sorts the numbers in the array (in increasing order). after showing that it correctly sorts 1 and 2 element intervals, you may make the (incorrect) assumption that the number of elements being passed to g-sort-recurse is always a multiple of 3 to simplify the notation (and drop the floors/ceilings).
Answers: 3
question
Computers and Technology, 22.06.2019 11:00
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
You know the right answer?
For this lab you will be creating your own struct, called Frog. You will need to create an array of...
Questions
question
Mathematics, 17.02.2022 18:50
question
History, 17.02.2022 18:50
question
Mathematics, 17.02.2022 18:50
question
Mathematics, 17.02.2022 18:50
question
Biology, 17.02.2022 19:00
Questions on the website: 13722367