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
ozzi
2 years ago
15

Write a program that repeatedly shows the user a menu to select the shape form three main shapes or to print the shapes created

so far. If the user selects to create a new shape, the program prompts the user to enter the values for the size of the selected shape (How many of the selected shape user wants to create). The shape is then stored in an array. If the user selects to print the current shapes, print the name and the total area of each shape to the console.
Computers and Technology
1 answer:
fomenos2 years ago
3 0

Answer:

Explanation:

The following code is written in Python. It creates a program that keeps printing out a menu allowing the user to create shapes. These shapes are saved in an array called shapes. Once the user decides to exit, it prints all of the shapes in the array along with their total area. The output can be seen in the attached picture below. Due to technical difficulties, I have added the code as a txt file below.

You might be interested in
What is an embedded system. Give examples
IRINA_888 [86]

Answer:

An embedded system is a part of a larger system which has either one or a limited number of dedicated functions.

It doesn't require much power to run and is cheap to make and design.

Explanation:

Examples include: cars, microwaves, traffic lights, washing machines, phones etc

6 0
3 years ago
In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After the statement cin >> one >
SSSSS [86.1K]

Answer:

variable one stores 10.5 and two stores 30.6

Explanation:

In c++ language, the cout keyword is used to write to the standard output. The input from the user is taken by using the cin keyword.

For the input from the user, a variable need is declared first.

datatype variable_name;

The input can be taken one at a time as shown.

cin >> variable_name;

The input for more than one variable can be taken in a single line as given by the syntax below.

1. First, two variables are declared.

datatype variable_name1, variable_name2;

2. Both input is taken simultaneously as shown.

cin >> variable_name1, variable_name2;

For the given scenario, two double variables are declared as below.

double one, two;

The question mentions input values for the two double variables as 10.5 and 30.6.

3. The given scenario takes both the values as input at the same time, in a single line as shown below.

cin >> one >> two;

4. After this statement, both the values entered by the user are accepted.

The values should be separated by space.

First value is stored in the variable one.

Second value is stored in the variable two.

5. The user enters the values as follows.

10.5 30.6

6. The value 10.5 is stored in variable one.

7. The value 30.6 is stored in variable two.

The c++ program to implement the above is given below.

#include <iostream>

using namespace std;

int main() {

   double one, two;      

   cout << " Enter two decimal values " << endl;

   cin >> one >> two;

   cout << " The input values are " << endl;

   cout << " one : " << one << " \t " << " two : " << two << endl;

   return 0;

}

OUTPUT

Enter two decimal values  

10.5 30.6

The input values are  

one : 10    two : 530.6

6 0
3 years ago
Which of the following is NOT a font style?<br> Italic<br> Bold<br> Regular<br> Iconic
madam [21]

Answer:

iconic

Explanation:

iconic iconic iconic

8 0
2 years ago
Read 2 more answers
Java uses ____ to implement method lookup.A) a jump tableB) an inheritance treeC) restricted accessD) polymorphism
sashaice [31]

Answer:

D) polymorphism

7 0
3 years ago
Gustavo is completing his homework online. When he uses a computer, what converts the information he inputs into instructions th
Otrada [13]
I can not understand your question, about it. What is homework of Gustavo working in, Visual or Dev C++ with any language?
4 0
3 years ago
Read 2 more answers
Other questions:
  • A customer has a web server for a small business. The business uses both wired and wireless networking. A Linksys WRT300N wirele
    13·1 answer
  • Design a class named QuadraticEquation for a quadratic equation ax^2+bx+x=0. The class contains: **private data fields a, b, and
    11·1 answer
  • what are some of the challenges that could arise from setting up a file management system on a computer
    15·1 answer
  • ____ occurs when two nodes simultaneously check a channel, determine that it is free, and begin to transmit.
    9·1 answer
  • Mississippi law codes state that bullying and cyberbullying are against the law. A court can decide to incur ___________________
    10·1 answer
  • Compiler is an example of​
    5·1 answer
  • When heading styles have been applied to a document, the user has the option to navigate through the document using which tab on
    13·1 answer
  • Which one did I buy the iPhone 13 or the Samsung S22 Ultra?
    14·2 answers
  • Question 2 of 10
    7·1 answer
  • The readline method of bufferedreader returns _____ when end of file is reached.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!