Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A 2 : Variable Assignment 1 Due Sunday by 1 1 : 5 9 pm Points 4 5 Submitting a file upload File Types c

A2: Variable Assignment 1
Due Sunday by 11:59pm Points 45 Submitting a file upload File Types c
Available Jan 14 at 12am - Jan 31 at 11:59pm
Problem A - Reflection Pond Measurements
Filename: pond.c
Welcome to UCF! In front of the library we have a beautiful reflection pond. ,It has a foundation and during Spirit Week students get to jump in and have a pep rally. It is a lot of fun!
You have been tasked to find out the area that the pond covers. You will be given the radius of the pond. In this example you can assume that the pond is a perfect half circle.
You may need this formula:
A=r2
Input Specification
Note: It is guaranteed that whoever uses your program will adhere to these specifications. This means that you do NOT have to check for them!
The radius entered will be integers in between 1 and 100, inclusive.
Output Specification
Produce two lines of output with the following format:
area =A
where A is the desired area. Please use 3.14 as pi to match the sample output.
Output Sample
Below is one sample output of running the program. Note that this sample is NOT a comprehensive test. You should test your program with different data than is shown here based on the specifications given above. In the sample run below, for clarity and ease of reading, the user input is given in italics while the program output is in bold. (Note: When you actually run your program no bold or italics should appear at all. These are simply used in this description for clarity's sake.)
Sample Run #1
Enter the radius of the pond.
9
area =127.17
Restrictions
Every program should include a header comment with the following information:
your name
Section Number
assignment title
date
Also, make sure you include comments throughout your code describing the major steps in solving the problem.
Reads Value as integes
Calculates Area Correctly Displays Area to two decimalplaces.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions