2
写一个9*9乘法口诀表。
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乘法口诀表。
精选 原创用到的知识点:循环、分支语句(if)
#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对齐
- 赞
- 收藏
- 评论
- 分享
- 举报
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK