Question
Assignment #4 Introduction to C Programming COP 3223 Objectives 1. To reinforce basic programming constructs 2. To learn how to use for loops 3. To
Assignment #4
Introduction to C Programming COP 3223
Objectives 1. To reinforce basic programming constructs 2. To learn how to use for loops 3. To learn how to nest loops for repeated sections of execution Introduction: ONLY USE THE OBJECTIVES STATED AT THE TOP. USE C PROGRAMMING ONLY..
Pirate Time Your friend has not stopped talking about how cool pirates and how awesome it would be if they could be a real-life pirate captain! To amuse your friend, you have decided to create a series of programs about pirates. Problem: Landing Crew When your friend arrives in the Caribbean with their crew, some will need to go ashore to look for treasure and some will need to stay aboard and take care of the ship. Your friend wants a crew of pirates who can reach the shore quickly so that more time can be spent seeking treasure. They have selected a landing party and now want to train them for speed. Your friend will time them leaving the boat and rowing to shore over a series of days to see if they are improving. To begin this program, you should first ask your friend how many days the landing parties will be observed. Then, for each day ask how many trips to shore were completed. For each trip, ask how long it took for the landing party to reach the shore. Calculate the average time for each day and print it so your friend can determine if their landing crew is getting faster. Input Specification 1. The number of days will be a positive integer. 2. The number of trips will be a positive integer. 3. The time for each trip will be a positive real number. Output Specification Output the average time for each day to three decimal places. Day #Y: The average time was X.XXX. Output Sample Below are some sample outputs of running the program. Note that these samples are NOT a comprehensive test. You should test your program with different 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 italics 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 claritys sake.) 2 Sample Run How many days will you observe the landing crew? 3 How many trips were completed in day #1? 2 How long was trip #1? 10.00 How long was trip #2? 15.00 Day #1: The average time was 12.500. How many trips were completed in day #2? 3 How long was trip #1? 9.50 How long was trip #2? 12.00 How long was trip #3? 13.25 Day #2: The average time was 11.583. How many trips were completed in day #3? 3 How long was trip #1? 10.00 How long was trip #2? 12.50 How long was trip #3? 15.00 Day #3: The average time was 12.500. Deliverables One source file landingcrew.c is to be submitted over WebCourses. RESTICITIONS: YOUR PROGRAM MUST COMPILE AND RUN USING Code::Blocks AND ONLY C PROGRAMMING. NOT C++, JAVA OR ANY OTHER PROGRAMMERS. Your program should include a header comment with the following information: your name, course number, section number, assignment title, and date. Also, make sure you include comments throughout your code describing the major steps in solving the problem. 3 Grading Details Your programs will be graded upon the following criteria: 1) Your correctness 2) Your programming style and use of white space. Even if you have a plan and your program works perfectly, if your programming style is poor or your use of white space is poor, you could get 10% or 15% deducted from your grade. 3) Compatibility You must submit C source files that can be compiled and executed in a standard C Development Environment. If your program does not compile, you will get a sizable deduction from your grade
Please restrickly stick to what is asked. I am absolute programmer with with c programming and need you help to help compile this code. Try to keep the codes as simple as possible. This is for a college project and I don't need to have the same code with someone else. thanks for corporation
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started