用VC++怎么样编程乘法口诀?
解决方案
40
#include “stdafx.h”
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
int x,y,z;
for(x=1;x<=9;x++)
{
for(y=1;y<=x;y++)
{
z=x*y;
printf(“%d*%d=%d “,y,x,z);
}
printf(“\n”);
}
return 0;
}
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
int x,y,z;
for(x=1;x<=9;x++)
{
for(y=1;y<=x;y++)
{
z=x*y;
printf(“%d*%d=%d “,y,x,z);
}
printf(“\n”);
}
return 0;
}