#include
#include
int main()
{
int y;
while(scnaf("%d",&y)!=EOF){
if(1912<=y && y<=2147483647)
printf("%d",y-1912);}
return 0;
}
題目有提到y(1912<=y<=2147483647)
然後應該是要減1911才對,而不是1912
所以寫出來應該是
#include<stdio.h>
#include<stdlib.h>
int main(void){
int y;
while(scanf("%d", &y)!=EOF)
{
if(1912<=y<=2147483647)
printf("%d",y-1911);
}
system("pause");
return 0;
}