A.1
#include
#include
float fun(float x,int n){
if(0==n){
return 1;
}else if(1==n){
return x;
}else{
return ((2*n-1)*x-fun(x,n-1)-(n-1)*fun(x,n-2)/n);
}
}
void main(){
int n;
float p,x;
cout<
cout<
cout<
}//main
A.2
#include
#include
#include
int fun1(int n){
int temp;
temp=(int)sqrt(n);
if(n==temp*temp){
return 1;
}else{
return 0;
}
}
int fun2(int n){
int a[3],i;
for(i=0;i<3;i++){
a=n%10;
n/=10;
}
if(a[0]== a[1] || a[1]== a[2] || a[0]== a[2])return (1);
else return 0;
}
void main(){
int n;
for(n=100;n<1000;n++){
if(fun1(n) && fun2(n)){
cout<
}
}
}//main
A.3
#include
struct{
int year;
int month;
int day;
}date;
void main()
{
int days;
cout<
cin>>date.year>>date.month>>date.day;
switch(date.month)
{
case 1: days=date.day; break;
case 2: days=date.day+31; break;
case 3: days=date.day+31+28;break;
case 4: days=date.day+31+28+31;break;
case 5: days=date.day+31+28+30+31;break;
case 6: days=date.day+31+28+31+30+30;break;
case 7: days=date.day+31+28+31+30+30+31;break;
case 8: days=date.day+31+28+31+30+30+31+31;break;
case 9: days=date.day+31+28+31+30+30+31+31+30;break;
case 10: days=date.day+31+28+31+30+30+31+31+30+31;break;
case 11: days=date.day+31+28+31+30+30+31&#