求問大佬我哪里出錯了 它輸出只有一行
#include <stdio.h>
int main()?
{?
? ? // 定義相乘數(shù)字i,j以及結果result
? ? int i, j, result;
? ? /*
? ? ?* 使用for循環(huán)解決本題相對簡單哦~
? ? ?* 小編偷偷的將源碼放在任務“不會了怎么辦”中了哦~
? ? ?* 小編希望童鞋們獨立完成哦~
? ? ?*/
? ? for(i=9,j=1;i>=j;j++)
? ? {
? ? ? ? if(i>j-1)
? ? ? ? {
? ? ? ? ? ? result=i*j;
? ? ? ? ? ? printf("%d*%d=%d\t",i,j,result);
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? --i;
? ? ? ? ? ? printf("\n");
? ? ? ? ? ? j=1;? ?//重新定義j
? ? ? ? }
? ? }
? ? return 0;
}
2020-10-12
#include <stdio.h>
int main()
{
??? // 定義相乘數(shù)字i,j以及結果result
??? int i, j, result;
??? /*
???? * 使用for循環(huán)解決本題相對簡單哦~
???? * 小編偷偷的將源碼放在任務“不會了怎么辦”中了哦~
???? * 小編希望童鞋們獨立完成哦~
???? */
??? for(i=9,j=1;i>=0;j++)
??? {
??????? if(i>j-1)
??????? {
??????????? result=i*j;
??????????? printf("%d*%d=%d\t",i,j,result);
??????? }
??????? else
??????? {
??????????? --i;
??????????? printf("\n");
??????????? j=0;?? //重新定義j
??????? }
??? }
??? return 0;
}