Skip to content

Instantly share code, notes, and snippets.

View hansen033's full-sized avatar

Hansen hansen033

  • Taiwan
View GitHub Profile
@hansen033
hansen033 / 除法計算.cpp
Last active October 19, 2017 06:57
2017/10/05
#include <iostream>
using namespace std;
int main ()
{
int a, b;
cout << "請輸入被除數:";
cin >> a;
cout << "請輸入除數:";
@hansen033
hansen033 / 判斷二次函數.cpp
Last active October 19, 2017 13:58
2017.10.19
#include <iostream>
using namespace std;
int main()
{
int a, b, c, x, y;
cout <<"方程式: y=a*x*x+b*x+c\n";
cout <<"請輸入方程式中的a\n";
#include <iostream>
using namespace std;
int main()
{
int a, b;
cout <<"判斷a是否為b的倍數\n";
cout <<"\n請輸入a:";
@hansen033
hansen033 / 找二次函數圖形的頂點.cpp
Last active October 19, 2017 23:08
2017.10.19 加分題
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int a, b, c, m, n, z;
cout <<"方程式: y=a*x*x+b*x+c\n";
cout <<"請輸入方程式中的a:\n";
@hansen033
hansen033 / 輸入日期判斷星座.cpp
Last active October 28, 2017 13:52
2017.10.20 前一天的修正版題目
#include <iostream>
using namespace std;
int main()
{
int month, b;
cout << "輸入出生日期來得知此日期出生的人的星座\n";
cout << "\n請輸入出生月份:";
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
int a, b, c, m, n, z;
cout <<"方程式: y=a*x*x+b*x+c\n";
cout <<"請輸入方程式中的a:\n";
@hansen033
hansen033 / 判斷成績等第.cpp
Last active November 9, 2017 11:17
2017/10/26
#include <iostream>
using namespace std;
int main()
{
int score;
cout << "輸入非0~100的數來退出\n";
@hansen033
hansen033 / 費氏數列.cpp
Created November 2, 2017 12:11
2017/11/02 上課測驗
#include <iostream>
using namespace std;
int main()
{
int first, second, max;
cout << "請輸入你要小於等於多少數值得費氏數列:\n";
cin >> max;
first = 1;
second = 1;
#include <iostream>
using namespace std;
int main(){
int limit;
cout << "please input the LIMIT:";
cin >> limit;
for (int times = 3; times < limit; times += times){
cout << times << " ";
}
@hansen033
hansen033 / 加法計算機.cpp
Created November 14, 2017 14:49
2017/11/09
#include <iostream>
using namespace std;
int main(){
int plus, ans;
ans = 0;
cout << "請輸入想要加起來的數(想要減的話請用負數),輸入完成後請輸入0來取得答案\n";
while (plus !=0){
cin >> plus;
ans += plus;