Determine by hand the output of each program listed on the following pages using
ID: 652102 • Letter: D
Question
Determine by hand the output of each program listed on the following pages using the data files shown below.
Contents of data file:
9-15-20
Program:
#include
#include
using namespace std;
int main ( void )
{
int x,z;
double y;
ifstream infile("E:dat1.in");
infile >> x >> y >> z;
cout << "x = " << x << endl << "y = " << y << endl
<< "z = " << z << endl;
infile.close();
return 0;
}
X = ?
Y = ?
Z = ?
Explanation / Answer
X = 9
Y = 15.0
Z = 20