Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main (void)
- {
- int n,q,w;
- while(1)
- {
- printf("輸入小於10的正整數(-1結束):");
- scanf("%d",&n);
- if(n == -1) {
- break;
- }
- if(n >= 10 || n < 1) {
- continue;
- }
- for(q=1; q<=n; q++)
- {
- for(w=1; w<=n; w++)
- {
- printf("%d*%d=%2d\t",w,q,w*q);
- }
- printf("\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement