owned this note changed 4 years ago
Published Linked with GitHub

程式範例解答

C++

輸出入

1.1

(Display two messages) Write a program that displays Introduction to Computers and Welcome to Object-Oriented Programming.

// P46 practice quiz 1.1 #include <iostream> using namespace std; int main(){ cout<<"Introduction to Computers."<<endl; cout<<"Welcome to Object-Oreiented Programming."<<endl; return 0; }

1.2

(Display five messages) Write a program that displays Welcome to C++ five times.

// P46 practice quiz 1.2 寫法一 #include <iostream> using namespace std; int main(){ cout<<"Welcome to C++"<<endl; cout<<"Welcome to C++"<<endl; cout<<"Welcome to C++"<<endl; cout<<"Welcome to C++"<<endl; cout<<"Welcome to C++"<<endl; return 0; }
// P46 practice quiz 寫法二 #include <iostream> using namespace std; int main(){ for(int i=0;i<5;i++){ cout<<"Welcome to C++"<<endl; } return 0; }

1.3

(Display a pattern) Write a program that displays the following pattern.

// P46 practice quiz #include <iostream> using namespace std; int main(){ return 0; }

1.4

(Print a table) Write a program that displays the following table:

// P46 practice quiz #include <iostream> using namespace std; int main(){ return 0; }

1.5

// P46 practice quiz #include <iostream> using namespace std; int main(){ return 0; }

1.6

// P46 practice quiz #include <iostream> using namespace std; int main(){ return 0; }

1.7

// P46 practice quiz #include <iostream> using namespace std; int main(){ return 0; }

1.8

// P46 practice quiz #include <iostream> using namespace std; int main(){ return 0; }

1.9

// P46 practice quiz #include <iostream> using namespace std; int main(){ return 0; }

變數使用

運算子

判斷式

while迴圈

for迴圈

Python

輸出入

變數使用

運算子

判斷式

while迴圈

for迴圈

Select a repo