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]
2 years 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]2 years 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
Which dhcp client option is used to provide a list of domain names to use in name resolution queries?
Rama09 [41]
Name resolution is done using DNS servers. DHCP provides a client with a list of DNS servers via option 6, "DNS Server".
4 0
4 years ago
For which of the following situations would it be best to use a heuristic in order to find a solution that runs in a reasonable
Montano1993 [528]

Answer:

The answer is "Option B".

Explanation:

In this question, determining the optimal path between several locations, which requires n!. It's also examining possible routes. It could just suggest here, designers need to do those equations as we have several forms. They have several methods to find the best and efficient path. Its basic idea is to use heuristic approaches for complex or uncertain issues so we do not provide proven solutions for linear programs.

5 0
3 years ago
Read 2 more answers
Please answer this question correctly​
Zigmanuir [339]

Answer:

i cant answer this im sorry

7 0
3 years ago
Write a program that converts a time in 12-hour format to 24-hour format. The program will prompt the user to enter a time in HH
podryga [215]

Answer:

This program is written in Python

inputtime = input("HH:MM:SS AM/PM: ")

splittime = inputtime.split(":")

secondAM = splittime[2].split()

if secondAM[1] == "AM":

   print(splittime[0]+":"+splittime[1]+":"+secondAM[0])

elif secondAM[1] == "PM":

   HH = int(splittime[0])

   HH = HH + 12

   print(str(HH)+":"+splittime[1]+":"+secondAM[0])

   

Explanation:

This line prompts user for input

inputtime = input("HH:MM:SS AM/PM: ")

This line splits the input string to HH, MM and "SS AM/PM"

splittime = inputtime.split(":")

This line splits "SS AM/PM" to SS and AM/PM

secondAM = splittime[2].split()

This line checks if time is AM

if secondAM[1] == "AM":

This line prints the equivalent time

   print(splittime[0]+":"+splittime[1]+":"+secondAM[0])

Else;

elif secondAM[1] == "PM":

The equivalent 24 hour is calculated

   HH = int(splittime[0]) + 12

This line prints the equivalent time

   print(str(HH)+":"+splittime[1]+":"+secondAM[0])

8 0
3 years ago
List 100 social media with functions​
olga55 [171]

Answer:

J

Explanation:

6 0
3 years ago
Other questions:
  • Create a different version of the program that: Takes a 3-digit number and generates a 6-digit number with the 3-digit number re
    14·1 answer
  • The part of the computer that provides acess to the internet is called?
    7·1 answer
  • Why would Google combining information from separate accounts across its services and sites have privacy implications for its us
    11·1 answer
  • What is the answer to this question on the thing I'm doing in apex
    6·1 answer
  • Which of these communication avenues is not regulated by the Federal Communications Commission (FCC)?
    12·1 answer
  • Not sure where I should ask this sorry
    15·1 answer
  • What tool is used to edit pre-existing range names? (check all that apply)?
    10·1 answer
  • What are the process of boots up a computer?​
    10·1 answer
  • Can someone else kill Raz and I can still get the challenge done by collecting the artifact in fort nite?
    13·1 answer
  • What Internet access method would be suitable for a business requiring a high bandwidth connection where no cabled options exist
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!