Advertisement
pigg

用C++寫中文版的九九乘法表 (主程式)

Dec 29th, 2015
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.61 KB | None | 0 0
  1. # include "ccc.h" //標頭檔網址 http://pastebin.com/ZawTAELV
  2. # include 基本輸入輸出流
  3.  
  4. 使用 命名空間 std;
  5.  
  6. 整數 主程式()
  7. {
  8.     整數 次數;
  9.     輸出 << "要做幾次99乘法表?" << 換行;
  10.     輸入 >> 次數;
  11.     當(次數 > 0)
  12.     {
  13.  
  14.         迴圈(整數 被乘數 = 1; 被乘數 <= 9; 被乘數++)
  15.         {
  16.             迴圈(整數 乘數 = 1; 乘數 <= 9; 乘數++)
  17.             {
  18.                 整數 積 = 被乘數*乘數;
  19.                 輸出 << 被乘數 << "*" << 乘數 << "=" <<<< " ";
  20.             }
  21.             輸出 << 換行;
  22.         }
  23.         輸出 << "還剩下" << 次數-1 << "次" << 換行;
  24.         次數--;
  25.     }
  26.     系統(暫停);
  27.     回傳(0);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement