Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Programming language is C. Obiectiv 1. 2. To reinforce basic programming constructs To learn how to use for loops Movies about dragons and dragon

The Programming language is C. image text in transcribed
image text in transcribed
Obiectiv 1. 2. To reinforce basic programming constructs To learn how to use for loops Movies about dragons and dragon training were very popular this summer. Your friend has not stopped talking about how awesome dragons are and how cool it would be to train them. To amuse your friend, you have decided to create a series of programs about dragons. Our dragons have stopped falling and can now make regular short flights. The only way to get better and strengthen their wings for longer flights is for the dragons to practice regularly. This program will track practice flights over a series of days and print out the average distance for each day. To begin this program, you should first ask the user how many days the dragon has been practicing. Then, for each day ask how many practice flights were completed. Following that, ask for the distance for each practice flight. Calculate the average distance for each day and print it so the dragon can see if they are getting stronger 1. The number of days will be a positive integer 2. The number of flights will be a positive integer. 3. The distance for each flight will be a positive real number. Output the average distance for each day to three decimal places. Day BY: The average distance is xXxx. Below are some sample outputs of running the program. Note that these samples are NOT a comprehensive test. You should test your program with dfferent data than is shown here based on the specifications given above. In the sample run below, for clarity and ease of reading, the user input is given in itolies while the program output is in bold. (Note: When you actually run your program no bold or italics should appear at all. These are simply used in this description for clarity's sake.) How many days has your dragon been practicing? How many flights were completed in day #1? How long was flight 1 10.00 How long was flight #2? 15.00 Day #1: The average distance is 12.500. How many flights were completed in day 827 How long was flight #1 9.50

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions