为啥把int result=a*b放在前面运行不了?
#include <stdio.h>
int main(void)
{
int a,b,result;
int result=a*b;
for(a=9;a>0;a--)
{
for(b=1;b<=a;b++)
{
printf(" %d*%d=%d ",a,b,result);
}
printf("\n");
}
return 0;
}
#include <stdio.h>
int main(void)
{
int a,b,result;
int result=a*b;
for(a=9;a>0;a--)
{
for(b=1;b<=a;b++)
{
printf(" %d*%d=%d ",a,b,result);
}
printf("\n");
}
return 0;
}
2019-08-20
举报