#include<stdio.h>
int main()
{int i,k=1;
double sum=0.0;
for(i=1;i<=100;i++)
{sum=sum+k*1.0/i;
k=-k;}
printf( " %lf",sum);
return 0;
}
#include<stdio.h>
int main()
{int i,k=1;
double sum=0.0;
for(i=1;i<=100;i++)
{sum=sum+k*1.0/i;
k=-k;}
printf( " %lf",sum);
return 0;
}
#include<stdio.h>
int main()
{ int i,count=0;
for(i=1;i<100;i++)
{ if(i%10==9)
{
printf( " %d",i);
count++;}
if(i/10==9)
printf(" %d",i);
count++;
}
printf(" \ncount=%d",count);
return 0;
}
#include<stdio.h>
int main()
{int i,j,count;
for(i=100;i<=200;i++)
{for(j=2;j<i;j++)
{if(i%j==0)break;
}
if(i==j)
{printf(" %d",i);
count++;
}
}
printf(" \ncount=%d",count);
return 0;
}