#5392: 幫幫我吧~~~


Vincent10 (135826)


#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
      long long int s,t,e;
      while(cin>>s>>t)
      {
      if(s>t)
      {
      e=s-t;
      cout<<e<<endl;
      }
      if(s<t)
      {
      e=t-s;
      cout<<e<<endl;
      }
      }
     system("PAUSE")
     return EXIT_SUCCESS;
}
到底是哪裡錯??

各位大大請幫幫我~~~

#5406: Re:幫幫我吧~~~


LinSCSISH (LinSC)


#include
#include

using namespace std;

int main(int argc, char *argv[])
{
      long long int s,t,e;
      while(cin>>s>>t)
      {
      if(s>t)
      {
      e=s-t;
      cout<      }
      if(s      {
      e=t-s;
      cout<      }
      }
     system("PAUSE")
     return EXIT_SUCCESS;
}
到底是哪裡錯??

用if( s > t )

   { ... }

   else if( s < t )

   { ... }

   else

   { ... }

的結構 

各位大大請幫幫我~~~