1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
artcher [175]
3 years ago
9

A car holds 16 gallons of gasoline and can travel 312 miles before refueling. Write aC++ program that calculates the number of m

iles per gallon the car gets. Display the result on the screen.
Computers and Technology
1 answer:
IgorC [24]3 years ago
6 0

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

You might be interested in
If you copy and paste from someone else's document (such as a website, a friend's paper, an instructor's solutions manual, etc.)
zzz [600]

Answer:

Deliberate

Explanation:

Plagiarizing means when some one copy the content of any topic from the sources i.e website, solutions manual, friend manual. And if some one check the solutions and find it that it was copied from somewhere the same we termed as plagiarizing.

In the given situation, if someone copying the content from someone else document so it would be called as deliberate plagiarizing

And if someone did not have any idea about it so we called accidental plagiarizing

8 0
3 years ago
What are the pros and cons of using ICT
qaws [65]

Answer:

Pros:

- Connect with friends, family in a short period of connecting time

- Faster, easier than paper

- The messages can be stored in the device for longer times, without being damaged, unlike paper files that easily get damages

- Digital communication can be done over large distances through internet and other things.

And many other pros

Cons:

- Software can be easily hacked

- Digital Communication has completelymake people become far to others. They would stop meeting face-to-face but instead of that, video call, chatting is become more popular

- Most of devices have hidden recording mechanisms that can take your information unknowingly and may be used to attack you in the future

And many other cons

Hope this helped :3

5 0
3 years ago
Copy the skeleton of code below into your answer. Then in the space indicated, add your own code to prompt the user for two numb
ahrayia [7]

Answer:

import java.util.*;

public class Main

{

public static void main(String[] args) {

    Scanner input = new Scanner(System.in);

   

 System.out.print("Enter the first: ");

 int first = input.nextInt();

 System.out.print("Enter the second: ");

 int second = input.nextInt();

 input.nextLine();

 System.out.print("Enter your name: ");

 String name = input.nextLine();

 

 int difference = Math.abs(second - first);

 

 System.out.println(name + ", the difference is " + difference);

}

}

Explanation:

*The code is in Java.

Create a Scanner object to get input from the user

Ask the user to enter the first, second, and name

Calculate the difference, subtract the second from the first and then get the absolute value of the result by using Math.abs() method

Print the name and the difference as in required format

7 0
2 years ago
During her presentation, Marie wanted more freedom to move about the room and interact with her audience. She can use _____.
S_A_V [24]

Answer:

The correct answer is:

"a laser pointer and a remote control"

Explanation:

Let us look at the options one by one.

notes pages and an LCD projector

When she is using these options, she cannot have the freedom to move as she has to operate the projector somehow.

laptop computer and a pointer

In this case she has to operate laptop so movement will be reduced.

<u>A laser pointer and remote control</u> will give her a lot of freedom to move as she can use the remote control to operate the slides and the pointer to point stuff ont the slides.

Hence,

The correct answer is:

"a laser pointer and a remote control"

5 0
3 years ago
Can u please help me solve this
azamat

Alice has twice as many pencils as Cara. Leon has three more pencils than Alice. The three children have a total of 58 pencils.

<h3>What are the no. of pencils?</h3>

The no. of pencils are there totally as the 11.

Read more about the basic maths:

brainly.com/question/19493296

#SPJ1

4 0
2 years ago
Other questions:
  • Match each feature to whether it influences audio or video quality
    6·1 answer
  • What is the left are if a slide in a presentation called
    15·1 answer
  • What is the name of the file manager in Microsoft Windows. The file manager used in Microsoft Windows is?
    12·2 answers
  • Write the definition of a class employee base on the modular specification: . A data member for Id of type int (private). A data
    10·1 answer
  • A ___describes a particular attribute of the dates item in a table​
    14·1 answer
  • What is it called when an attacker convinces you to enter personal information at an imposter website after receiving an email f
    10·2 answers
  • . Write a toString method for this class. The method should return a string containing the base, height and area of the triangle
    10·1 answer
  • Question<br> 1. Who was the first to use an abacus
    6·1 answer
  • ________(fill in the blank)in online education is intrinsically related to equity.
    13·1 answer
  • If you double the force of and object what happens to the acceleration
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!