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
neonofarm [45]
2 years ago
7

Assuming there are 7.481 gallons in a cubic foot. Write a program that asks the user to enter a number of gallons, and then disp

lays the equivalent in cubic feet.
The program must use assignment operators, cout’s, cin’s, and declaration of variables.
Computers and Technology
1 answer:
34kurt2 years ago
6 0

Using the knowledge in computational language in C++ it is possible to write a code that asks the user to enter a number of gallons.

<h3>Writting the code:</h3>

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>int main()</em>

<em>{</em>

<em>       float gallons, cufeet;</em>

<em>       cout << "\nEnter quantity in gallons : ";</em>

<em>       cin >> gallons;</em>

<em>       cufeet = gallons / 7.481;</em>

<em>       cout << "Equivalent in cublic feet is " << cufeet << endl;</em>

<em>       return 0;</em>

<em />

<em>}</em>

See more about C++ at brainly.com/question/19705654

#SPJ1

You might be interested in
Using a text editor, create a file that contains a list of at least 15 six-digit account numbers. Read in each account number an
grigory [225]

Answer:

Explanation:

The following code is written in Java. It reads every input and checks to see if it is valid. If it is it writes it to the output file.

import java.io.File;

import java.io.FileNotFoundException;

import java.io.FileWriter;

import java.io.IOException;

import java.util.Scanner;

class Brainly {

           public static void main(String[] args) {

               try {

                   File myObj = new File("C:/Users/Gabriel2/AppData/Roaming/JetBrains/IdeaIC2020.2/scratches/input.txt");

                   Scanner myReader = new Scanner(myObj);

                   FileWriter myWriter = new FileWriter("C:/Users/Gabriel2/AppData/Roaming/JetBrains/IdeaIC2020.2/scratches/output.txt");

                   while (myReader.hasNextLine()) {

                       String data = myReader.nextLine();

                       int sum = 0;

                       for (int x = 0; x < 5; x++ ) {

                           sum += data.charAt(x);

                       }

                       int remainder = (sum % 10);

                       System.out.println(remainder);

                       System.out.println(data.charAt(5));

                       if (remainder == Integer.parseInt(String.valueOf(data.charAt(5)))) {

                           System.out.println("entered");

                           try {

                               myWriter.write(data + "\n");

                               System.out.println("Successfully wrote to the file.");

                           } catch (IOException e) {

                               System.out.println("An error occurred.");

                               e.printStackTrace();

                           }

                       }

                       sum = 0;

                   }

                   myWriter.close();

                   myReader.close();

               } catch (FileNotFoundException e) {

                   System.out.println("An error occurred.");

                   e.printStackTrace();

               } catch (IOException e) {

                   e.printStackTrace();

               }

           }

       }

3 0
3 years ago
What is used to give credit to the source from which information is obtained?
Sati [7]
The Answer is (A) because a citation gives credit to the sources from which your information was obtained. Linkage has nothing to do with it... Plagiarism is the exact opposite of that.... And a format is just a way something is in order or arranged.
8 0
3 years ago
If a friend has been drinking ...
sladkih [1.3K]

Answer:

B is the correct choice

6 0
4 years ago
Create a new program in python that:
LiRa [457]

Answer:

here

Explanation:

If you want to display something on screen you can use the print() function. ... An example of code that will ask the user to enter their name and display it on ... stores it in a variable called city city = input("What is the capital city of England ... If you want to perform a format check in Python you will need to make use of a library.

6 0
3 years ago
A school secretary has been asked to prepare a letter
larisa [96]

Answer:

devices. Providing accessibility, resources and connectivity so that learning is ... Supporting learners in using technology for out-of-school learning experi- ... Historically, a learner's educational opportunities have been limited by the ... “When I asked him what the difference was,” recalled Balzer, “he said that now he.

7 0
3 years ago
Other questions:
  • What is alphabet symmetry
    12·2 answers
  • Which form of malware contains hidden code that is triggered by meeting or reaching a specific condition? (A) Trap door (B) Viru
    12·1 answer
  • Select the correct answer. Which sentence best describe an effective management strategy? A. Conceal game-related clippings prio
    12·2 answers
  • Hi guys help me plz . How to get ios 10 zip file for android devices ? or how to port ios 10 or higher for htc one me ?
    11·1 answer
  • Which of the following can a cell contain?
    7·2 answers
  • .doc What is the difference between a skilled hacker and an unskilled hacker, other than skill levels? How does the protection a
    5·1 answer
  • A friend complains that she is always running out of money even though she “never buys anything expensive.” What advice would yo
    5·2 answers
  • You are creating a mobile version of a community discussion site for busy moms. Users post questions and other topics for discus
    10·1 answer
  • Consider the conditions and intentions behind the creation of the internet—that it was initially created as a tool for academics
    12·1 answer
  • Plz I need the answer!!!:(
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!