TA的每日心情 | 郁闷 2015-5-7 22:59 |
---|
签到天数: 129 天 [LV.7]常住居民III
滴水大师
 
- 积分
- 2717
|
不知道这样可以不可以#include "stdafx.h"
#include "stdio.h"
// 一个变量 9x9乘法表
int main(int argc, char* argv[])
{
int a;
a = 1;
printf("%dx%d=%d\n",a,1,a*1);
while(a)
{
printf("%dx%d=%d ",a,2,a*2);
if (a == 2)
{
break;
}
a++;
}
printf("\n");
a =1;
while(a)
{
printf("%dx%d=%d ",a,3,a*3);
if (a == 3)
{
break;
}
a++;
}
printf("\n");
a = 1;
while(a)
{
printf("%dx%d=%d ",a,4,a*4);
if (a == 4)
{
break;
}
a++;
}
printf("\n");
a = 1;
while(a)
{
printf("%dx%d=%d ",a,5,a*5);
if (a == 5)
{
break;
}
a++;
}
printf("\n");
a = 1;
while(a)
{
printf("%dx%d=%d ",a,6,a*6);
if (a == 6)
{
break;
}
a++;
}
printf("\n");
a = 1;
while(a)
{
printf("%dx%d=%d ",a,7,a*7);
if (a == 7)
{
break;
}
a++;
}
printf("\n");
a = 1;
while(a)
{
printf("%dx%d=%d ",a,8,a*8);
if (a == 8)
{
break;
}
a++;
}
printf("\n");
a = 1;
while(a)
{
printf("%dx%d=%d ",a,9,a*9);
if (a == 9)
{
break;
}
a++;
}
printf("\n");
return 0;
}
|
|