Write a Scilab code to calculate the surface area and volume for a cube, cuboid, cone, and cylinder. The user should specify the shape followed by the required dimension (ex. For cube input base, for cylinder input radius and height etc.....) Ask the user to enter the shape. If the user entered any wrong shape other than mentioned above, display the message Wrong Option"

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 10SA
icon
Related questions
Question
Part (1):
Write a Scilab code to calculate the surface area and volume for a
cube, cuboid, cone, and cylinder. The user should specify the shape
followed by the required dimension (ex. For cube input base, for
cylinder input radius and height etc......)
• Ask the user to enter the shape.
• If the user entered any wrong shape other than mentioned above, display the message
*“Wrong Option"
Ask the user to enter the required dimensions.
Ask the user to specify the required output (Surface area or volume).
Display the speeified output.
Comment on each line in your code.
Transcribed Image Text:Part (1): Write a Scilab code to calculate the surface area and volume for a cube, cuboid, cone, and cylinder. The user should specify the shape followed by the required dimension (ex. For cube input base, for cylinder input radius and height etc......) • Ask the user to enter the shape. • If the user entered any wrong shape other than mentioned above, display the message *“Wrong Option" Ask the user to enter the required dimensions. Ask the user to specify the required output (Surface area or volume). Display the speeified output. Comment on each line in your code.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Concept of Flowchart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,