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
GaryK [48]
1 year ago
14

In order to paint a wall that has a number of windows, we want to know its area. Each window has a size of 2 ft by 3 ft. Write a

program that reads the width and height of the wall and the number of windows, using the following prompts.
Wall width:
Wall height:
Number of windows:
Computers and Technology
1 answer:
Eva8 [605]1 year ago
4 0

Using the knowledge in computational language in JAVA it is possible to write a code that write a program that reads the width and height of the wall and the number of windows, using the following prompts

<h3>Writting the code:</h3>

<em>import java.util.Scanner;</em>

<em>public class WallArea {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner sc = new Scanner(System.in);</em>

<em>        final int areaOfWindows = 6;</em>

<em>        System.out.print("Wall width: ");</em>

<em>        double width = sc.nextDouble();</em>

<em>        System.out.print("Wall height: ");</em>

<em>        double height = sc.nextDouble();</em>

<em>        System.out.print("Number of windows: ");</em>

<em>        double numberOfWindows = sc.nextDouble();</em>

<em>        double area = (width * height) - (numberOfWindows * areaOfWindows);</em>

<em>        System.out.println("Area: " + area);</em>

<em>    }</em>

<em>}</em>

See more about JAVA at brainly.com/question/12975450

#SPJ1

You might be interested in
2. Imagine you play a game of fetch with the dog. It takes the dog 60 seconds to run a total of 180 meters. What was the dog's a
vodka [1.7K]

180 meters in 60 seconds is an average speed of 180m/60s = 3 m/s.

3 0
3 years ago
Write a program that determines the price of a movie ticket (similar to the one in the chapter). The program asks for the custom
goblinko [34]

Answer:

#include <iostream>

using namespace std;

int main() {

int age,time;

float price;

cout<<"Enter age:";

cin>>age;

cout<<"Enter time(in 24 hour clock for noon 1200):";

cin>>time;

if(age>13){

if(time<1700){

price=5;

}else{

price=8;

}

}else{

if(time<1700){

price=2;

}else{

price=4;

}

}

cout<<"Price: $"<<price<<endl;

}

Explanation:

Okay, here are the steps to be taken in order to be able to Write a program that determines the price of a movie ticket as given in details in the question above. Therefore, checked the steps below;

==> Input the age and the time.

==> If the age is not greater than 13, input the time(that is <1700) and follow it by imputing the price.

And if the age is greater than 13, you will also need to input the price. Just as below;

#include <iostream>

using namespace std;

int main() {

int age,time;

float price;

cout<<"Enter age:";

cin>>age;

cout<<"Enter time(in 24 hour clock for noon 1200):";

cin>>time;

if(age>13){

if(time<1700){

price=5;

}else{

price=8;

}

}else{

if(time<1700){

price=2;

}else{

price=4;

}

}

cout<<"Price: $"<<price<<endl;

}

6 0
3 years ago
Discuss what repetitions structures are, and how they differ from the vectorization approaches we have previously studied in the
gogolik [260]

Repetition structures, or loops, are used when a program needs to repeatedly process one or more instructions until some condition is met, at which time the loop ends. Many programming tasks are repetitive, having little variation from one item to the next. Vectorized mathematical code appears more like the mathematical expressions found in textbooks, making the code easier to understand. That is the difference. Hope I could help you on Brainly.com!

6 0
3 years ago
You have repaired a broken LCD panel in a laptop computer. However, when you disabled the laptop, you bent the hinge on the lid
Alex787 [66]
Yes it would take a second or todo
8 0
3 years ago
Examine the evolution of the World Wide Web (WWW) in terms of the need for a general-purpose markup language. Provide your persp
creativ13 [48]

WWW is used to browse for view the webpage basically content is normally displayed as HTML pages.

In any browser's webpage irrespective of language been used output content display as HTML pages only.

<u>Explanation:</u>

  • In other methods is used XML format where it is opened and closed tag for every word editing XML file is very useful.
  • XML tools are ready is available where end-user can edit or create by for example notepad++ extra
  • It is a language designed to store the data in a specific format and easily process and used by a coding language or web pages.
4 0
3 years ago
Other questions:
  • List 3 ways that you can use excel and the features it includes and explain why a spreadsheet is the best choice for this task.
    5·1 answer
  • To make sure that you do not get too tired when typing for long periods, how often should you get up and stretch? Every 15 minut
    9·1 answer
  • Which scenario depicts an ethical workplace practice by a business owner? A. sharing personal information of its employees with
    8·2 answers
  • In which phase of the software development process would probing questions be used to verify the problem definition?
    12·1 answer
  • Write the definition of a class clock. the class has no constructors and three instance variables. one is of type int called hou
    12·1 answer
  • At each layer of the OSI model, data is appended to the original message and then sent on to the next lower layer. What is this
    10·1 answer
  • Which type of film would typically require the least amount of input from a screenwriter?
    10·1 answer
  • 2 ways to make your computer work faster ( please help asap )
    6·1 answer
  • If a file you are opening for appending does not exist, the operating system will detect the missing file and terminate the oper
    14·1 answer
  • We can create tables in MS. Word from *<br> 2 points<br> Insert Tab<br> Home Tab<br> Mailings Tab
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!