9x9乘法表使用for循環,哪里出了問題?
#include <stdio.h>
int main()
{
??? // 定義相乘數字i,j以及結果result
??? int i, j, result;
??? /*
???? * 使用for循環解決本題相對簡單哦~
???? * 小編偷偷的將源碼放在任務“不會了怎么辦”中了哦~
???? * 小編希望童鞋們獨立完成哦~
???? */
??? for (i=10,i<0,i--)
??? {
??????? for (j=0,j<10,j++)
??????? {
??????????? printf("%d*%d",i*j);
??????????? result=i*j;
??????????? printf("%d",result);
??????? }
??????? printf("\n");
??? }
???
??? return 0;
}
2016-08-03
你少輸出個等號
for(j=9;j>0;j--)
? ? {
? ? ? ? for(i=1;i<=j;i++)
? ? ? ? {
? ? ? ? ? ? result = i*j;
? ? ? ? ? ? printf("%d*%d=%d",j,i,result);
? ? ? ? ? ? if(i*j>9)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? printf(" ");
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? printf(" ?");
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? printf("\n");
? ? }
2016-07-08
for (i=10,i<0,i--) ? ?i的值為10,第二表達式就不符合,下面就不看了。
2016-07-02
for(j=1;j<i;j++)