Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The program prompts the user to enter the weight in kg. The program prompts the user to enter the target as one character (g. 1,
The program prompts the user to enter the weight in kg. The program prompts the user to enter the target as one character (g. 1, or m); Gainin weight (t), or Maintaining body weight (m). In case the target is 'g' (gaining body weight) The protein intake is 1.2 gm for each Kg of the body weight . The water intake is 0.033 liters/kg of the body weight. . In case the target is 'm', which is maintaining body weight, then: . The protein intake is 1.0 gm for each Kg of body weight . The water intake is 0.036 liters/kg of the body weight. In case the target is 'l', which means losing body weight, then: The protein intake is 2.2 gm for each Kg of the body weight The water intake is 0.032 ml/kg of the body weight. Use a switch structure to solve this problem and calculate the daily protein and wat weight (in kg), the desired target, the protein (in gm) and water intake (in liter) as gi Example 1: Example 2: Enter your name: Ali Enter your weight: 73 Enter your fitness target (g, I, or m): 1 Ali, your weight is: 73 To Lose Body Weight: Your protein intake is: 73 gm Your daily water intake is: 2.628 Liters Example 3: Enter your weight: 57 Enter your fitness target (g. 1, or m): m Fatima, your weight is: 57 kg To Maintain Body Weight: Your protein intake is: 68.4 gm Your daily water intake is: 1.824 Liters Example 4: Enter your name: Amal Enter your weight: 64 Enter your fitness target (g. 1, or m): k Amal, your weight is: 64 kg
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