Computing

posted by .

Write a program that displays the following menu:
1 = Square
2 = Circle
3 = Ellipse
4 = End program

When the user selects a shape from the menu, the program should ask for any necessary data, either:
the length of the square’s side,
the circle’s radius, or
the ellipse's X-radius and Y-radius
and then it should draw that shape in the center of the screen.

Use a loop to repeat this process until the user enters 4.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. C Programming

    Write a program that prompts the user to enter a temperature, followed by a letter representing Celsius (C) or Fahrenheit (F). Then prompt the user for the conversion type and print the results to the screen with one decimal point. …
  2. computer Science (need answer ASAP)

    Write a complete C# program that displays a menu comprising of the followings: Main Menu 1) Calculate Fuel Consumption 2) Calculate Weekly Wages 3) About This Program 4) Exit Program Enter your Choice: Calculating Fuel Consumption …
  3. Programming with Eclipse

    Design, implement, test, and debug an application to compute an employee’s weekly pay. If the employee works more than 40 hours a week, the employee earns 1.5 times the basic hourly pay for any time worked over 40 hours. The program …
  4. Programming

    How would the flow charts and pseudocode look for this?
  5. computer science

    You are required to use the Account class to simulate an ATM machine. Create ten accounts in an array with id 0, 1, 2 ...9, and initial balance $50. The system prompts the user to enter an id. If the id is entered incorrectly, ask …
  6. Programming and Design

    Draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user's car travels 20 miles per gallon of gas. Design a program that prompts the user for a number …
  7. c++ programming

    I need some help with my homework please Write a C++ program to prompts the user to enter the first character of shape name (Cycle, Rectangle, or Triangle). Then calculate the area of that shape. „h If the user enters another character …
  8. Computer Science/Pseudo Code Python

    Hi, I'm confused about an assignment. I'm not sure what to do and would like some help. An example: Write a program that obtains two integer numbers from the user. It will print out the sum of those numbers. Pseudo code: Prompt user …
  9. C++

    // Program: name of program // Author: your name // Date Written: date you began writing the program /* Abstract: Brief description of the program */ Include in-line comments in the body of your program. You can convert temperature …
  10. Elements of programming

    Write a QBASIC program that calculates the area of a circle, a rectangle and a triangle. The program should allow the user to select the shape (C or c for circle, R or r for Rectangle, T or t for Triangle) whose area he or she wants …

More Similar Questions