Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Project 1 Basic I/O Overview In this project you will begin to explore the basics of input and output from a C program. In order
Project 1 Basic I/O Overview In this project you will begin to explore the basics of input and output from a C program. In order to perform error checking and to provide a robust, interactive program, you will also get to grips with looping andconditionals. Additionally, you will get some practice using Makefiles and the oompiler Submission Instr uctions This and a other assignments will be submitted through BBLearn Look for the submission link in the same place you found this assignment Submit all your c and .h files along with your Makefile, but do not zip them! Technical Description and Instructions Your program will take some inputs from the user and use them to perform a ballist ic calculation, that is it will calculate how long it would take for a launched object to hit the ground and how far the launched object went. Specifically, it will prompt the user for a starting height above the ground for the object, the angle of launch, and the initial launch velocity. Once good inputs have been collected, your program will then display the time and dis tance results to the user Note that your program may be evaluated by a program I compose for just this purpose. As such, when the instructions indicate that something should be printed in a certain way, failing to do so may cause my evaluator to reject your program! Your program should do the following: 1. Display a welcome message. 2. Prompt for a height above the ground in meters. Your program should acoept numbers with decimal parts such as 16.037 for this input. Any number less than 0should be rejected with this message "Input Error: Unable to accept negative starting height". Likewise, if the user enters something that is not a number, it should be rejected with "Input Error: Expected a positive number". All error messages should end with at lea st one newline n). If you reject an input, reprint the initial prompt and wait for input again. 3. After receiving acceptable input for the height, prompt the user for a launching angle. The angle given will be in degrees and should be between 90and -90". If an invalid angle is entered, reject it with the message "Input Error: Expected an angle between 90 and -90". Like the previous item, reprompt for input until a correct input is received Project 1 Basic I/O Overview In this project you will begin to explore the basics of input and output from a C program. In order to perform error checking and to provide a robust, interactive program, you will also get to grips with looping andconditionals. Additionally, you will get some practice using Makefiles and the oompiler Submission Instr uctions This and a other assignments will be submitted through BBLearn Look for the submission link in the same place you found this assignment Submit all your c and .h files along with your Makefile, but do not zip them! Technical Description and Instructions Your program will take some inputs from the user and use them to perform a ballist ic calculation, that is it will calculate how long it would take for a launched object to hit the ground and how far the launched object went. Specifically, it will prompt the user for a starting height above the ground for the object, the angle of launch, and the initial launch velocity. Once good inputs have been collected, your program will then display the time and dis tance results to the user Note that your program may be evaluated by a program I compose for just this purpose. As such, when the instructions indicate that something should be printed in a certain way, failing to do so may cause my evaluator to reject your program! Your program should do the following: 1. Display a welcome message. 2. Prompt for a height above the ground in meters. Your program should acoept numbers with decimal parts such as 16.037 for this input. Any number less than 0should be rejected with this message "Input Error: Unable to accept negative starting height". Likewise, if the user enters something that is not a number, it should be rejected with "Input Error: Expected a positive number". All error messages should end with at lea st one newline n). If you reject an input, reprint the initial prompt and wait for input again. 3. After receiving acceptable input for the height, prompt the user for a launching angle. The angle given will be in degrees and should be between 90and -90". If an invalid angle is entered, reject it with the message "Input Error: Expected an angle between 90 and -90". Like the previous item, reprompt for input until a correct input is received
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