- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
-
- {
- int a=0;
- int b=0;
- cout<<"請輸入a的值"<<endl;
- cin>>a;
- cout<<"請輸入b的值"<<endl;
- cin>>b;
- if (a>b)
- {
- cout<<"a>b"<<endl;
- }
- else if(a<b)
- {
- cout<<"a<b"<<endl;
- }
- else
- {
- cout<<"a=b"<<endl;
- }system(pause
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
複製代碼- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- for(int i=1;i<10;i++)
- {
- cout<<"第"<<i<<"名"<<endl;
- }
-
-
- system("pause");
-
-
-
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
複製代碼 |