el se ex it(1) break default: exit(1) return x void maino i int x=20, y=8 <<SD(x <<SD(x,y,’*)<" cout<<SD(x+y, y, '/')<<end 该程序的运行结果是: 3 #includeiostream. h> #includestring. h> struct Worker { char name[15];/姓名 int age //年龄 float pay;//工资 void maino rker x char *t="Weirong int d=45: float f=1235 strcpy(x name, t) cout<<x name<<"<<x age<<"<<x pay <endl 该程序的运行结果是: 4 #include<iomanip. h> void LG (int*& a, int& m) I a=new int[ml int水 for(int i=0; i<m; i++) *p++=i*i;} 第5页共8页第 5 页 共 8 页 else exit(1); break; default: exit(1); } return x; } void main() { int x=20,y=8; cout<<SD(x,y,'-')<< " "; cout<<SD(x,y,'*')<< " "; cout<<SD(x+y,y,'/')<<endl; } 该程序的运行结果是: 3、#include<iostream.h> #include<string.h> struct Worker {char name[15]; //姓名 int age; //年龄 float pay; //工资 }; void main() { Worker x; char *t="WeiRong"; int d=45; float f=1235; strcpy(x.name,t); x.age=d; x.pay=f; cout<<x.name<< " "<<x.age<< " "<<x.pay<<endl; } 该程序的运行结果是: 4、 #include<iomanip.h> void LG(int*& a, int& m) { a=new int[m]; int* p=a; for(int i=0;i<m;i++) *p++=i*i;}