再看一下!怎么改?
#include<iostream.h> #include<stdio.h> #include<math.h>
int main() { union{ int anInt[2]; div_t; div_result; };
cout<<"Enter an Integer: "<<'\n'; cin>>anInt[0];
cout<<"Divide by: "<<'\n'; cin>>anInt[1];
div_result=div(anInt[0],anInt[1]);
cout<<"Quotient: "<<div_result.quot<<'\n'; cout<<"Reminder: "<<div_result.rem<<'\n';
return 0; }