Answer:
#include <iostream>
#include<iomanip>
using namespace std;
double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon)
{
double dollarCost = 0;
dollarCost = (dollarsPerGallon * drivenMiles) / milesPerGallon;
return dollarCost;
}
int main()
{
double miles = 0;
double dollars = 0;
cout << "Enter miles per Gallon : ";
cin >> miles;
cout << "Enter dollars per Gallon: ";
cin >> dollars;
cout << fixed << setprecision(2);
cout << endl;
cout << "Gas cost for 10 miles : " << DrivingCost(10, miles, dollars) << endl;
cout << "Gas cost for 50 miles : " <<DrivingCost(50, miles, dollars) << endl;
cout << "Gas cost for 400 miles: "<<DrivingCost(400, miles, dollars) << endl;
return 0;
}
Explanation:
- Create a method definition of DrivingCost that accepts three input double data type parameters drivenMiles, milesPerGallon, and dollarsPerGallon and returns the dollar cost to drive those miles
.
- Calculate total dollar cost and store in the variable, dollarCost
.
- Prompt and read the miles and dollars per gallon as input from the user
.
- Call the DrivingCost function three times for the output to the gas cost for 10 miles, 50 miles, and 400 miles.
Answer:
int* strikeCounter ;
int someVal;
scanf("%d", &someVal);
strikeCounter =&someVal;
*strikeCounter =someVal*4;
Explanation:
Here we took one int variable and read that value from user. we assigned that int variable address to pointer variable "strikeCounter " and we are pointing the value of strikecounter as 4 times of that integer variable value
▪︎An onscreen camera for drawing virtual images is called "turtle" in python language.
The codes we will be using in the following algorithm are :
▪︎Turtle.left
▪︎Turtle.right
▪︎Turtle.move #upward
An algorithm to help the python turtle reach the finish line :
- Turtle.left
- Turtle.left
- Turtle.left
- Turtle.move#upward
- Turtle.move#upward
- Turtle.move#upward
- Turtle.right
- Turtle.right
- Turtle.move#upward
- Turtle.left
Answer:
The answer is "Virtual supercomputer"
Explanation:
A supercomputer is a machine with or close to a maximum fastest operating output. It commonly used in science and engineering systems, that have to manage or calculate massive server numbers.
- A virtual supercomputer is also known as a cloud device.
- It gives you to the platform, and provides you a built-in cloud environment, by mixing different virtual servers.
- Its rebellion is to be used by individuals.
Answer:
The bleed is the part on the side of a document that gives the printer a small amount of space to account for movement of the paper, and design inconsistencies. Artwork and background colors often extend into the bleed area. After trimming, the bleed ensures that no unprinted edges occur in the final trimmed document.
Explanation: