Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: Create a C++ console application to calculate how many circles can fit in a square. Ask the user for the side of the square

image text in transcribed
image text in transcribed
Instructions: Create a C++ console application to calculate how many circles can fit in a square. Ask the user for the side of the square and the diameter of the circle. Tell the user how many of those circles can fit in the square. They do not have to be full circles. For instance, the answer can be 2.79 You learned how areas of circle and square are calculated in the 5th grade. If you do not remember, please search the internet for it. Requirements Add the following comments in the beginning of your codes. o Your name, date, and purpose of the program Add other proper comments as you code. Tell the user what the program does. Follow all naming rules and conventions. Do not use magic numbers in your codes (Pl must be a constant). Use 3.14159265358979 for the value of PI. Use proper data es for your variables. Format the output to display two decimals. Wed Mar 10 Assignment Details CS 18 Programming in Patas MSRING 2021 - SECTION 2514 Instructions: Create a C++ console application to calculate how many circles can fit in a square. Ask the user for the side of the square and the diameter of the circle. Tell the user how many of those circles can fit in the square. They do not have to be full circles. For instance, the answer can be 2.79 You learned how areas of circle and square are calculated in the 5th grade. If you do not remember, please search the internet for it. Requirements Add the following comments in the beginning of your codes. Your name, date, and purpose of the program Add other proper comments as you code. Tell the user what the program does. Follow all naming rules and conventions. . Do not use magic numbers in your codes (Pl must be a constant), Use 3.14159265358979 for the value of Pl. Use proper data types for your variables. Format the output to display two decimals. How to do it: This is how you should organize your codes. Declare all your variables first. Ask the user for input. Do the calculations. Display the result properly labeled. Do not display just a number. How to submit: Create a text document (Notepad or any other text file with .txt file extension). Include your name plus the lab name in the name of the text file. Examples: Sarah Gonzales_Lab3, or Roy Brown_CirclesinSquare Copy and paste your codes in the text file. Upload the text file. Submit Assignment Next Previous

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 ASP.NET 2.0 And Databases

Authors: John Kauffman, Bradley Millington

1st Edition

0471781347, 978-0471781349

More Books

Students also viewed these Databases questions

Question

What is a media kit, and what role does it serve?

Answered: 1 week ago