18 Classic C Programs You Must Memorize
1、/*Output the 9*9 multiplication table. There are 9 rows and 9 columns, with i controlling the rows and j controlling the columns.*/ #include “stdio.h” main() {int i,j,result; for (i=1;i<10;i++) { for(j=1;j<10;j++) { result=i*j; printf(“%d*%d=%-3d”,i,j,result);/*-3d means left-aligned, occupying 3 spaces*/ } printf(“\n”);/*Line break after each row*/ } } 2、/*Classical problem: There is a pair of rabbits, … Read more