返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6. //宣告   
  7. int a=0;
  8. int b=0;
  9. if(a>b)
  10. {
  11. cout<<"a>b"<<"\r\n";
  12. }
  13. else if(a<b)
  14. cout<<"a<B"<<"\r\n";
  15. else
  16. {
  17. cout<<"a=b"<<"\r\n";   
  18. }     
  19. cout<<"請輸入a的值";
  20. cin>>a;
  21. cout<<"請輸入b的值";
  22. cin>>b;
  23. cout<<"a="<<"\r\n";
  24. cout<<"b="<<"\r\n";
  25. cout<<"a=b"<<"\r\n";
  26. system("pause");
  27. return 0;






  28. }   
複製代碼

TOP

返回列表