Question: c++ 1.Write a fragment of code that writes the even numbers between 0 and 10000 to a text fileseparated by one space: 0 2 4
c++
1.Write a fragment of code that writes the even numbers between 0 and 10000 to a text fileseparated by one space: 0 2 4 6 and so on (the last one is 10000).Declare and open the file (make up a file name)Declare any other variables you need to accomplishthis taskWrite the requiredvaluesto the fileClose the file.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
