#include <stdio.h>
void main ()
{
int i; float s;
i=1; s=0;
while (i<=10)
{
s=s+1.0/i;
i++;
}
printf ("和=%d",s);
}
#include <stdio.h>
void main ()
{
int i; float s;
i=1; s=0;
while (i<=10)
{
s=s+1.0/i;
i++;
}
printf ("和=%d",s);
}