Ausgabe 9 * 9 Multiplikationsformel

Insgesamt 9 Zeilen und 9 Spalten, i Kontrollzeile, j Kontrollspalte

#include <stdio.h>
int main()
{
   int tmp;
   for(int i = 1;i < 10;i++ )
   {
     for(int j = 1;j < 10;j++)
     {
       tmp = i * j;
       printf("%d*%d=%-3d",i,j,tmp);//%-3d保证每个口诀之间空3格,整齐排列
     }
     printf("\n");
   }
   return 0;
}

Ich denke du magst

Origin blog.csdn.net/weixin_45824959/article/details/104198477
3/9
Empfohlen
Rangfolge