/*
求九九乘法表
*/
- 02. * Copyright (c) 2011, 烟台大学计算机学院
- 03. * All rights reserved.
- 04. * 作 者:赵晓晨
- 05. * 完成日期:2012 年 11月 1日
- 06. * 版 本 号:v1.0
- 07. * 输入描述: 设置程序输出乘法口诀
- 08.
- 09. * 问题描述:用循环来解决问题
- 10.
- 11. * 程序输出:乘法口诀
- 12.
- 13. * 问题分析:一步步的编程,套用循环得出结果
- 14.
- 15. * 算法设计:略
- 16. */</SPAN><PRE class=cpp name="code"><SPAN style="COLOR: #000099"># include <iostream>
- # include <cmath>
- using namespace std;
- int main()
- {
- int i,j;
- for(i=1;i<=9;i++){
- for(j=1;j<=i;j++){
- cout<<i<<"*"<<j<<"="<<i*j<<" ";
- }
- cout<<endl;
- }
- return 0;
- }
- 运行结果: