??в????е????????
???????????? ???????[ 2016/8/3 16:39:21 ] ??????????в???
??в????????????????Щ???????????????????????
- ??????????????????????????Χ?????????????Χ???
- ??????????????
- ???????ж????????????if(a>=0)?е?a=0??
1.????????????
?κ???????????????ж??????????洢?????????C??????DOS????Windows????Dos???μ?C?????и????????????洢??Χ???±??
???????? |
???? |
??Χ |
???????short?? |
2B |
-32768--32767 |
?????int?? |
2B |
-32768--32767 |
???????long?? |
4B |
-2147485648--2147483647 |
??????char?? |
1B |
256 |
?????????float?? |
4B |
-2147485648--2147483647 |
????????double?? |
8B |
-1.7*10308—1.7*10308 |
Windows???μ?C?????и????????????洢??Χ???±??
???????? |
???? |
??Χ |
???????short?? |
2B |
-32768--32767 |
?????int?? |
4B |
-2147485648--2147483647 |
???????long?? |
4B |
-2147485648--2147483647 |
??????char?? |
1B |
256 |
?????????float?? |
4B |
-2147485648--2147483647 |
????????double?? |
8B |
-1.7*10308—1.7*10308 |
???????Turbo C??DOS?????????漲?????????????????????????????????????????????-32768—32767?????Χ???????????VC??Windows?????????漲?????????????????????????????????????????????-2147485648—2147483647?????Χ??
???????????????????????????
#incldue
void main()
{
int a=32765;
int b=3;
int c;
c=a+b;;
printf(“%d”??c);
}
????ó???????DOS?????μ?Turbo C?????????????c??32768???????????Χ?????????????????
?????a??b??????????α???????????г?????Χ????a??b?????????????????????????????????????????????????????????????
????????????????????????????????????????????????????????
#include
void main()
{
int a[5];
int i=0;
for(i=0;i<=5;i++)
scanf(“%d”??&a[i]); //????????5?????
for(i=1;i<5;i++)
printf(“%d”??a[i]); //???????5?????
}
?????????????i??????????
???????????????£?
#include
void main()
{
int a[5];
int i=0;
for(i=0;i<5;i++)
scanf(“%d”??&a[i]); //????????5?????
for(i=0;i<5;i++)
printf(“%d”??a[i]); //???????5?????
}
???if???elseif??????й??????????if(a>=0)??else if(b<1)?????????????????????????????????????????a=0??b=1???????????????????????
/*
???????????????2λ????10-99??????????????????????????
*/
#include
void main()
{
int a;
int b;
int c;
printf(“??????????10??99????????”);
scanf(“%d%d”??&a??&b);
if(a<=10||a>=99)
printf(“a????????10??99???”);
else if(b<=10||b>=99)
printf(“b????????10??99???”);
else
{
c=a+b;
printf(“??????????%d”??c);
}
}
????????if????else if?????????ж??????????
if(a<=10||a>=99)
printf(“a????????10??99???”);
??a<=10????a>=99?????????????????????????????????10??99?????????????????10??99?????λ????????????????????仰???????
if(a<10||a>99)
printf(“a????????10??99???”);
?????????else if???????????
else if(b<10||b>99)
printf(“b????????10??99???”);
???????????????????????????????????β??????????????????????????????????????
2.????????
3.????ж????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11