返回列表 發帖
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
    int number =10;
    string str = "hello";
    cin >> number;
    cin >> str;
    cout << number;
    cout << str;
cout<<"penelope"<< endl;
system("pause");
return 0;

TOP

#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{   
    int x=28,y=15;
    cout<<"當x的值為"<<x<<",y的值為"<<y<<"時...."<<endl;
   cout<<"x+y="<<x+y<<endl;  
   cout<<"x-y="<<x-y<<endl;  
   cout<<"x*y="<<x*y<<endl;  
   cout<<"x/y="<<x/y<<endl;  
   cout<<"x%y="<<x%y<<endl;  

system("pause");
return 0;
}

TOP

返回列表