输入之后,没有输出结果
#include "stdio.h"#include "conio.h"
main()
{
int n=1,score;
float y=0.;
scanf("%d\n",&score);
if(score/10==0&&x>0&&x<=100)
{switch(score/10)
{case 10:
{
while(n<=100)
y+=1.0/n;
++n;
};break;
case 9:
{
while(n<=90)
y+=1.0/n;
++n;
};break;
case 8:
{
while(n<=80)
y+=1.0/n;
++n;
};break;
case 7:
{
while(n<=70)
y+=1.0/n;
++n;
};break;
case 6:
{
while(n<=60)
y+=1.0/n;
++n;
};break;
case 5:
{
while(n<=50)
y+=1.0/n;
++n;
};break;
case 4:
{
while(n<=40)
y+=1.0/n;
++n;
};break;
case 3:
{
while(n<=30)
y+=1.0/n;
++n;
};break;
case 2:
{
while(n<=20)
y+=1.0/n;
++n;
};break;
case 1:
{
while(n<=10)
y+=1.0/n;
++n;
};break;
default:printf("error");
}
}
printf("n=%d,y=%f",n,y);
getch();
}