2

写一个9*9乘法口诀表。

 1 year ago
source link: https://blog.51cto.com/u_15797078/5723627
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

写一个9*9乘法口诀表。

精选 原创

Find8 2022-09-29 17:38:46 ©著作权

文章标签 2d #include i++ 文章分类 C/C++ 编程语言 阅读数197

用到的知识点:循环、分支语句(if)

写一个9*9乘法口诀表。_2d
写一个9*9乘法口诀表。_i++_02

#include<stdio.h>

int main()

int i=0;

for(i=1;i<=9;i++)

int j=0;

for(i=1;j<=i;j++)

printf(" %d*%d=%-2d",i,j,i*j);//有一个空格,不然对不齐

printf("\n");

return 0;

注:%2d右对齐、%-2d对齐

  • 收藏
  • 评论
  • 分享
  • 举报

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK