Help. - Terminal+Courses1 // Flowers.cpp - This program reads names of flowers and whetherthey are grown in shade or sun from an input2 // file and prints the information to the user's screen.3...


Help.


* MindTap - Cengage Learning<br>8 https://ng.cengage.com/static/nb/ui/evo/index.html?deploymentld=5992722366307456066370989340&elSBN=9780357430583&id=D1344324817&snapshotld=2685346&<br>* CENGAGE MINDTAP<br>Q Search this course<br>Vincent v<br>«<br>A My Home<br>Opening Files and Performing File Input in C++<br>Opening Files and Performing File<br>Flowers.cpp<br>flowers.dat<br>>- Terminal<br>+<br>Courses<br>1 // Flowers.cpp - This program reads names of flowers and whether<br>they are grown in shade or sun from an input<br>2 // file and prints the information to the user's screen.<br>3 // Input:<br>4 |/ Output: Names of flowers and the words sun or shade.<br>Input<br>O Catalog and Study Tools<br>A-Z<br>E Rental Options<br>Summary<br>flowers.dat.<br>- College Success Tips<br></><br>5<br>In this lab, you open a file and read input from that file in a<br>6 #include <fstream><br>prewritten C++ program. The program should read and print<br>Career Success Tips<br>7 #include <iostream><br>the names of flowers and whether they are grown in shade or<br>8 #include <string><br>sun. The data is stored in the input file named flowers.dat.<br>9 using namespace std;<br>10 int main()<br>11 {<br>? Help<br>O Give Feedback<br>Instructions<br>12<br>// Declare variables here<br>13<br>1. Ensure the source code file named Flowers.cpp is open in<br>14<br>// Open input file<br>the code editor.<br>15<br>16<br>2. Declare the variables you will need.<br>17<br>// Write while loop that reads records from file.<br>3. Write the C++ statements that will open the input file<br>18<br>fin >> flowerName;<br>19<br>flowers.dat for reading.<br>// Print flower name using the following format<br>//cout << var <«

Extracted text: * MindTap - Cengage Learning 8 https://ng.cengage.com/static/nb/ui/evo/index.html?deploymentld=5992722366307456066370989340&elSBN=9780357430583&id=D1344324817&snapshotld=2685346& * CENGAGE MINDTAP Q Search this course Vincent v « A My Home Opening Files and Performing File Input in C++ Opening Files and Performing File Flowers.cpp flowers.dat >- Terminal + Courses 1 // Flowers.cpp - This program reads names of flowers and whether they are grown in shade or sun from an input 2 // file and prints the information to the user's screen. 3 // Input: 4 |/ Output: Names of flowers and the words sun or shade. Input O Catalog and Study Tools A-Z E Rental Options Summary flowers.dat. - College Success Tips 5 In this lab, you open a file and read input from that file in a 6 #include prewritten C++ program. The program should read and print Career Success Tips 7 #include the names of flowers and whether they are grown in shade or 8 #include sun. The data is stored in the input file named flowers.dat. 9 using namespace std; 10 int main() 11 { ? Help O Give Feedback Instructions 12 // Declare variables here 13 1. Ensure the source code file named Flowers.cpp is open in 14 // Open input file the code editor. 15 16 2. Declare the variables you will need. 17 // Write while loop that reads records from file. 3. Write the C++ statements that will open the input file 18 fin >> flowerName; 19 flowers.dat for reading. // Print flower name using the following format //cout < var=""><« "="" grows="" in="" the="" "="">< var2=""><« endl; 20 21 4. write a while loop to read the input until eof is 22 reached. 23 fin.close(); 5. in the body of the loop, print the name of each flower and 24 return 0; 25 } // end of main function where it can be grown (sun or shade). 6. execute the program by clicking the run button at the bottom of the screen. grading when you have completed your program, click the submit button to record your score. 5:12 pm 12/14/2021 ip endl;="" 20="" 21="" 4.="" write="" a="" while="" loop="" to="" read="" the="" input="" until="" eof="" is="" 22="" reached.="" 23="" fin.close();="" 5.="" in="" the="" body="" of="" the="" loop,="" print="" the="" name="" of="" each="" flower="" and="" 24="" return="" 0;="" 25="" }="" end="" of="" main="" function="" where="" it="" can="" be="" grown="" (sun="" or="" shade).="" 6.="" execute="" the="" program="" by="" clicking="" the="" run="" button="" at="" the="" bottom="" of="" the="" screen.="" grading="" when="" you="" have="" completed="" your="" program,="" click="" the="" submit="" button="" to="" record="" your="" score.="" 5:12="" pm="" 12/14/2021="">
Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here