를 받 는
1. ¶
~cpp #include <stdio.h> int main() { int number; /*받 */ int count; /* 2 9 */ printf(" 를 !!!\n"); scanf("%d", &number); if(number<=1 || number>=10) printf(" !!!\n"); else { printf(" %d .\n", number); for(count=2; count<=9; ++count) { printf("%d*%d=%d\n", number, count, number*count); } } system("PAUSE"); return 0; }
2. ¶
~cpp #include <stdio.h> void main() { int a; int b; printf(" ");scanf("%d",&a); for (b=1;b<10;b++) printf("%d * %d= %d\n",a,b,a*b); system("PAUSE"); }
3. ¶
~cpp #include <stdio.h> void main() { int i,j; printf(" ."); scanf("%d",&i); if(i>9 || i<2) printf(" ."); else for(j=1; j<=9; j++) printf("%d * %d = %d\n",i,j,i*j); system("PAUSE"); }