Answer:
The following program:
int value; //set an integer vaiable
indata.open("currentsales");
outdata.open("projectedsales");
//read one integer from the file "currentsales".
indata >> value;
//write twice of its value into the file "projectedsales".
outdata << (value*2);
indata.close();
outdata.close();
Explanation:
Here, we define an integer variable "value".
Then, we use open() method with indata and outdata for "currentsales" and "projectsales".
Then, we read one integer from the file "currentsales".
Then, we write twice of its value into the file "projectedsales".
Then, we close both open() method which we open previously by using close() method.