#6640: 不知道錯在哪裡


wang_jason1101 (皓歪是也)


#include<iostream>
using namespace std;  
int main() 
{     long int a,b,c,x;     
  while(cin >> a )
{b=a%10;
 c=a/10;
 if(b>=0 && b<=4)
{x=2*c;
}
else if(b>=5 && b<=9)
{x=2*c+1;
     }
       
cout << x << endl; 
}     
return 0;}
 
初學程式設計,
請各位多多指教。