Answered step by step
Verified Expert Solution
Question
1 Approved Answer
outputte result.iX ). The data in the input wie TS SHOWN IN Figure rand the expected data in the output file is shown in Figure
outputte result.iX ). The data in the input wie TS SHOWN IN Figure rand the expected data in the output file is shown in Figure 2. Note: Please write C ++ statements WITHOUT blank spaces unless it is absolutely needed. Example: int num,a,b; 1 0 1 2 0 1. 111 2 2e - 0 0 0 3 3 . 1 0 1 1 0 0 3 3 O 0 2 2 2 0 0 0 1. 111 0 0 0 11 3 3 Figure 2: Output file S u m = 1 6 Figure 1: Input file 1 2 3 4 5 6 7 8 9 #include #include #include using namespace std; int main() { float num[10], sum = 0; int bil = 0; fstream inputfile, outputfile; 10 11 1/a) Open the input file named "data.txt" (2 marks) 12 i 13 14 1/6) Open the output file named "result.txt" (2 marks) 16 17 18 20 1/c) Check for successful opening file (2 marks) if ( 22 cout
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started