Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hey guys, need some help with this c++ practice problem without using control statements, (so the code should not have things like this if/then/while). i

Hey guys, need some help with this c++ practice problem without using control statements, (so the code should not have things like this if/then/while). i wrote it using infile and indata but im still having issues, so id like someone to help me out. the "input_file.text" is

Raising_Arizona 6000000 22847564 Vampire's_Kiss 2000000 725131 The_Wicker_Man 40000000 23643531 The_Ice_Pirates 9000000 13075390 Krull 47000000 16519460 

image text in transcribed

image text in transcribed

here is the same output

image text in transcribed

Unit 3: Programming CSIS 123 Programming Fundamentals: The purpose of this lab is to gain practice using variables for file input, processing, and file output Your friend is interested in knowing if his favorite movies were box office successes. He gives you a file, and needs you to write a file labeling the movie title, budget, gross, and profit for each movie. File is attached here: input_file.txt Constraints Do not use any concepts beyond the current chapter, unless explicitly stated in the tasks below Hint: Examine the input text file. You will be repeating the setps below for each record Task 1: Setup Variables 1. Add your input text file to the resource files folder 2. Add yor output text file to the resource files folder 3. Use preprocessor directives to include input/output, file input/output, string variables, and inputoutput manipulation. 4. Declare the input file variable you will use inplace of cin for file input. 5. Declare the output file variable you will use inplace of cout for file output. 6. Declare variables to contain movie titles, of type string 7. Declare variables to contain budget and gross, of type double 8. Declare variables to contain net profit, of type double 9. Separate Task 1 from Task 2 by pressing ENTER on your keyboard. This provides a single line of whitespace in your code Task 2: Input Data 1. Use the variable in Task 1.4 to open the text file in Task 1.1 2. Use the variable in Task 1.5 to open the text file in Task 1.2 3. Use the variable in Task 1.4 to populate variables from Task 1.6 and 1.7 4. Separate Task 2 from Task 3 by pressing ENTER on your keyboard. This provides a single line of whitespace in your code Task 3: Process Data 1. Use the variables from Task 1.7 to populate the variable from Task 1.8. 2. Separate Task 3 from Task 4 by pressing ENTER on your keyboard. This provides a single line of whitespace in your code

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_2

Step: 3

blur-text-image_3

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Eric Redmond ,Jim Wilson

1st Edition

1934356921, 978-1934356920

More Books

Students also viewed these Databases questions

Question

Can you think of an explanation other than ESP for that experience?

Answered: 1 week ago

Question

True or False: You can compare three means using a t-test.

Answered: 1 week ago