Answer:
Program for measurement in meters and then converts it into miles, feet, and inches:
#include<iostream.h>
#include<conio.h>
void main()
{ float meter, mile, feet, inches;
cout<<"enter meters";
cin>>meters";
feet=meter×3.2808;
mile= meter×0.000621371;
inches= meter×39.3701;
cout<<"Value of"<<meter<<"meter"<<"in feet is"<<feet<<"feet":
cout<<"Value of"<<meter<<"meter"<<"in mile is"<<mile<<"mile";
cout<<"Value of"<<meter<<"meter"<<"in inches is"<<inches<<"inches";
getch();
}
1.) Go get bag of pet food from cabinet
2.) Set the bag on counter
3.) Get pet food dish out of cabinet
4.) Open pet food bag, pour pet food into dish
5.) Close bag, give dish to pet.
Answer:
total = 0
for i in range(4):
bill = float(input("Enter bill for quarter " + str(i+1) + ": "))
total += bill
average = total / (4 * 3)
if average > 75:
print("Average monthly bill is $" + str(average) + ". Too much water is being used")
if 25 <= average < 75:
print("Average monthly bill is $" + str(average) + ". A typical amount of water is being used")
if average < 25:
print("Average monthly bill is $" + str(average) + ". Thank you for conserving water")
Explanation:
*The code is in Python.
Create a for loop that asks the user to enter the bill for 4 quarters and calculate the total of the bills
Calculate the average monthly bill, divide the total by 12
Check the average for the given conditions. Depending on its value print the required message along with the average monthly bill