1、根据输入的分数求等级(注意逻辑运算符的处理,C语言中真用1表示,假用0表示)
2、三个数排序
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int a,b,c,t;
printf("请输入三个数,以空格隔开:");
scanf("%d %d %d",&a,&b,&c);
if(a<b)
{
t=a;
a=b;
b=t;
}
if(a<c)
{
t=a;
a=c;
c=t;
}
if(b<c)
{
t=b;
b=c;
c=t;
}
printf("%d %d %d\n",a,b,c);
system("pause");
return 0;
}
素数:在所有的非零自然数中,除1和自身外没有其他因数的数叫做质数。质数又叫做素数。 例如2,3,5,7,11等就是素数
回文数:"回文数"是一种数字。如:98789, 这个数字正读是98789,倒读也是98789,正读倒读一样,所以这个数字就是回文数。
1000以内的回文数:在自然数中,最小的回文数是0,其次是:1,2,3,4,5,6,7,8,9,11,22,33,44,55,66,77,88,99,101,111,121,131,141,151,161,171,181,191,202,212,222,232,242,
252,262,272,282,292,303,313,323,333,343,353,363,373,383,393,404,414,424,434,444,454,464,474,484,494,
505,515,525,535,545,555,565,575,585,595,606,616,626,636,646,656,666,676,686,696,707,717,727,737,747,
757,767,777,787,797,808,818,828,838,848,858,868,878,888,898,909,919,929,939,949,959,969,979,989,999.