公告版位
星落的瞬間!放棄的後悔是永遠!

目前分類:各種C++(CMD.EXE中) (43)

瀏覽方式: 標題列表 簡短摘要



用Code::Block寫的,本來想用VC寫,可惜不會。

//damody #include <iostream> int main() { unsigned long long a; long b = 1,d; char e; bool f; using namespace std; do { cout << "請輸入一個正整數:__________\b\b\b\b\b\b\b\b\b\b"; f = 1; b = 1; cin >> a; if (a > 0 and a <= 10000000) { while (a > 1) { b++; if (a % b == 0) { cout << b; d = 0; while (a % b == 0) { d++; a = a / b; } if (d != 1) cout << " ^ " << d; if (a > 1) cout << " * "; } } } else cout << "超出範圍!"; cout << endl; cout << "是否繼續?(y/n)"; cin.get(); e = getchar(); system("cls"); if (e != 'y') f = 0; } while (f == 1); return 0; }

讓地獄深紅的天亮 發表在 痞客邦 留言(0) 人氣()

滑鼠左鍵在任意單字連點兩下即會將單字反白,
若為變數則顯示其型態。

讓地獄深紅的天亮 發表在 痞客邦 留言(0) 人氣()

原始碼:http://down.gogobox.com.tw/t2329175/jw2m2
//從簡單的開始吧!
/*
  Name: 質因數判斷
  Date: 19/06/08 09:59
*/
#include
int main()
{
          using namespace std;

讓地獄深紅的天亮 發表在 痞客邦 留言(0) 人氣()

«123