Compute BMI and Weighted Average Scores Program

What is the task described in the data?

The data provides information on writing a C Programming that gathers user input for weight and height to calculate BMI, as well as calculating separate averages and weighted averages for exam, lab, and project scores. What steps should be taken to accomplish this task?

Answer:

The task at hand involves creating a C program that prompts the user to input their weight and height, then proceeding to calculate the Body Mass Index (BMI) based on these inputs. Additionally, the program must prompt the user for exam, lab, and project scores, calculate separate averages for each, and compute the weighted average according to the provided weights.

Explanation:

The first step in tackling this task is to prompt the user to enter their weight and height. Subsequently, the program should convert the height from feet to inches before calculating the BMI using the inputted weight and height. Moving forward, the program needs to prompt the user for scores on exams, labs, and projects, calculate separate averages for each category, and then proceed to weight the averages accordingly.

To accomplish this, it is crucial to implement appropriate functions within the program to avoid redundancy and improve code organization. Utilizing the math.h library to access trigonometric functions like sin() and cos() will be necessary for accurate calculations. Furthermore, defining functions for gathering user scores and computing averages for exams, labs, and projects is essential to streamline the process.

Lastly, the weighted average should be computed based on the weights provided for exams (30%), labs (5%), and projects (15%). Once all calculations are complete, the program should display the final weighted average as a percentage to the user.

Remember, creating a structure chart can help outline the flow of data and functions within the program, aiding in determining the appropriate functions needed for each component of the task. If in doubt, seek guidance from your TA to ensure a well-structured and efficient program.

← How to measure ac current inspirational guide Scrum team roles development team member vs scrum master →