asks Flowers.cpp flowers.dat >- Terminal 20 string flowerName; 21 22 string growsIn; Astilbe grows in the Shade Marigold grows in the Sun Begonia grows in the Sun Primrose grows in the Shade Cosmos grows in the Sun Dahlia grows in the Sun Geranium grows in the Sun Foxglove grows in the Shade Trillium grows in the Shade Pansy grows in the Sun Petunia grows in the Sun Daisy grows in the Sun Aster grows in the Sun Program utilizes correct code 23 24 // Open input file 1 out of 2 checks passed. Review the results below for more details. 25 26 fin.open("flowers.dat"); ecks 27 28 // Write while loop that reads records from file. 29 code Pattern . Complete 30 mplements code to open input file 31 while(fin >» flowerName && fin >> growsIn)//one line reading flowerName and another one reading where to grow in code Pattern Incomplete 32 rogram uses while loop 33 { 34 escription 35 // Print flower name using the following format 36 earched your code for a specific pattern: nhile.+\W.fin. +eof.+ 37 cout « flowerName <«" grows in the "« growsIn <« endl; 38 [here](https:// 39 } 40 You can learn more about regular expressions 41 // Print flower name using the following format 42 43 //cout << var <« " grows in the " << var2 « endl; 44 45 > 46 Program outputs successfully 47 fin.close(): 48 return 0; 49 } 50 else 51 { 52 cout<<"Flowers.cpp is closed"

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

what's the error?

Tasks
Flowers.cpp
flowers.dat
+
>- Terminal
20 string flowerName;
Astilbe grows in the Shade
Marigold grows in the Sun
Begonia grows in the Sun
Primrose grows in the Shade
Cosmos grows in the Sun
Dahlia grows in the Sun
Geranium grows in the Sun
Foxglove grows in the Shade
Trillium grows in the Shade
Program utilizes correct code
21
5.00
22 string growsIn;
out of
10.00
23
24 // Open input file
1 out of 2 checks passed. Review the results below for more details.
25
26 fin.open("flowers.dat");
27
Checks
28 // Write while loop that reads records from file.
29
Pansy grows in the Sun
Petunia grows in the Sun
Code Pattern • Complete
30
Implements code to open input file
31 while(fin » flowerName && fin >> growsIn)//one line reading flowerName and another one reading
where to grow in
Daisy grows in the Sun
Aster grows in the Sun
Code Pattern • Incomplete
32
Program uses while loop
33 {
34
35 // Print flower name using the following format
36
Description
Searched your code for a specific pattern:
while.+\W.fin. +eof.+
37 cout <« flowerName << " grows in the " <« growsIn <« endl;
38
39 }
You can learn more about regular expressions
[here](https://
40
41 // Print flower name using the following format
42
43 //cout <« var <« " grows in the " <« var2 <« endl;
44
45
Program outputs successfully
>
46
47 fin.close();
48 return 0;
49 }
50 else
51 {
52 cout<< "Flowers.cpp is closed"<<endl;
53 }
54
55 } // End of main function
56
57
Transcribed Image Text:Tasks Flowers.cpp flowers.dat + >- Terminal 20 string flowerName; Astilbe grows in the Shade Marigold grows in the Sun Begonia grows in the Sun Primrose grows in the Shade Cosmos grows in the Sun Dahlia grows in the Sun Geranium grows in the Sun Foxglove grows in the Shade Trillium grows in the Shade Program utilizes correct code 21 5.00 22 string growsIn; out of 10.00 23 24 // Open input file 1 out of 2 checks passed. Review the results below for more details. 25 26 fin.open("flowers.dat"); 27 Checks 28 // Write while loop that reads records from file. 29 Pansy grows in the Sun Petunia grows in the Sun Code Pattern • Complete 30 Implements code to open input file 31 while(fin » flowerName && fin >> growsIn)//one line reading flowerName and another one reading where to grow in Daisy grows in the Sun Aster grows in the Sun Code Pattern • Incomplete 32 Program uses while loop 33 { 34 35 // Print flower name using the following format 36 Description Searched your code for a specific pattern: while.+\W.fin. +eof.+ 37 cout <« flowerName << " grows in the " <« growsIn <« endl; 38 39 } You can learn more about regular expressions [here](https:// 40 41 // Print flower name using the following format 42 43 //cout <« var <« " grows in the " <« var2 <« endl; 44 45 Program outputs successfully > 46 47 fin.close(); 48 return 0; 49 } 50 else 51 { 52 cout<< "Flowers.cpp is closed"<<endl; 53 } 54 55 } // End of main function 56 57
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
ListBox
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education