✍️ Get Writing Help
WhatsApp

The area and perimeter

The following program is supposed to read the length and width of a rectangle from a file named input.txt and write the area and perimeter of the numbers to a file named output.txt. However, it fails to do so. Rewrite the program so that it accomplishes what it is intended to do. (Also, include statements to close the files.) (10)

include

using namespace std;

int main()

double length, width;

ofstream outfile;

infile.open(“input.txt”);

infile >> length >> width;

outfile

return 0;

“area=”

<< ” ,=”” perimeter=””>

return 0;

}

>

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102