#include <stdio.h>
main()
{int a;
printf("input fraction:\n");
scanf("%d\n",&a);
switch(a%10)
case 10
case 9: printf("A"\n);break;
case 8: printf("B"\n);break;
case 7: printf("C"\n);break;
case 6: printf("D"\n);break;
default: printf("E"\n);
}
大概就是这样,我没测试你看看吧.
[[it] 本帖最后由 vcbaiyang 于 2008-11-17 11:50 编辑 [/it]]
main()
{int a;
printf("input fraction:\n");
scanf("%d\n",&a);
switch(a%10)
case 10
case 9: printf("A"\n);break;
case 8: printf("B"\n);break;
case 7: printf("C"\n);break;
case 6: printf("D"\n);break;
default: printf("E"\n);
}
大概就是这样,我没测试你看看吧.
[[it] 本帖最后由 vcbaiyang 于 2008-11-17 11:50 编辑 [/it]]
平生只流两行泪,半为浮生半美人.