Answer:
// here is code in C++.
#include <bits/stdc++.h>
using namespace std;
// main function
int main()
{
// variables Declaration and initialization
int no_gallon=16;
int dis=312;
// find the miles per gallon
double mile_gallon=dis/double(no_gallon);
// print the results
cout<<"number of gallons: "<<no_gallon<<endl;
cout<<"distance travel before refueling: "<<dis<<endl;
cout<<"miles per gallon is: "<<mile_gallon<<endl;
return 0;
}
Explanation:
Declare and initialize the number of gallon and distance travel without refueling. Calculate the miles per gallon by dividing distance with number of gallons.Then print the results.
Output:
number of gallons: 16
distance travel before refueling: 312
miles per gallon is: 19.5
Answer:
def funct1():
h=int(input("Enter height of the box"))
w=int(input("Enter the width of the box"))
L=int(input("Enter the length of the box"))
surface_area=2*(h*w + h*L + w*L)
return surface_area
a=funct1()
print(a)
Explanation:
Please check the answer section.
Answer:
Explanation:
It is assumed that name and age have been declared suitably for storing names and ages. so the following is the code to read in a name and age and printout the message "the age of name is age. "
cin >> Name;
cin >> Age;
cout << "The age of " << Name << " is " << Age << ".";
I think its B ir look on safari