1 #include<stdio.h> 2 #include<conio.h> 3 int main() 4 { 5 int i,j; 6 for(i=1;i<=9;i++) 7 { 8 for(j=1;j<=i;j++) 9 { 10 printf("%d*%d=%d\t",j,i,j*i); 11 } 12 puts(""); 13 } 14 return 0; 15 }
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int i,j; 6 for(i=1;i<=9;i++) 7 { 8 for(j=1;j<=i;j++) 9 { 10 cout<<j<<"*"<<i<<"="<<j*i<<"\t"; 11 } 12 cout<<endl; 13 } 14 return 0; 15 }
public class NineNine{ public static void main(String[]args){ System.out.println(); for (int j=1;j<10;j++){ for(int k=1;k<10;k++) { if (k>j) break; System.out.print(k+"*"+j+"="+j*k+"\t"); } System.out.println(); } } }
原文:https://www.cnblogs.com/YHFBlogs/p/14897335.html