Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ The file below contains first and last names and the radii of circles. You'll need to cut and paste the data into a text

C++

The file below contains first and last names and the radii of circles. You'll need to cut and paste the data into a text file. Write a program to read the file and store the first names and the radii in two arrays. You'll need an array of type string and an another array of some numeric type. The arrays should each hold 12 elements. Then, print out the first names and the circle areas, each in a column of width 10. Make sure you match the implied output format and that you check for a successful file open. Include a function to calculate of the circle area, using the formula:

Area = PI * radius * radius

For PI, use a named constant equal to 3.14

Input data (copy to a text file):

LoriBeth Allen 79 Chachi Arcola 125 Richie Cunningham 171 Howard Cunningham 255 Marion Cunningham 252 Joanie Cunningham 234 Al Delvecchio 122 Arthur Fonzarelli 255 Ralph Malph 165 Roger Phillips 61 Jenny Piccalo 55 Potsie Weber 210

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

The Database Management Systems

Authors: Patricia Ward, George A Dafoulas

1st Edition

1844804526, 978-1844804528

Students also viewed these Databases questions

Question

Please make it fast 6 .

Answered: 1 week ago

Question

What basic questions can HR analytics answer?

Answered: 1 week ago