/*Tanel Toova 2-3 * Kirjutada programm, mis väljastab korrutustabeli lihtsal kujul */ #include int x; // declaration of integer type variable x int y; // declaration of integer type variable y int main(void) { printf(" |"); //first 3 characters of line 1 for(x=1; x<=10; x++){ //rest of line 1 printf("%5d",x); } printf("\n"); //next line for(x=1; x<=53; x++){ //line 2 printf("-"); } printf("\n"); //next line for(x=1; x<=10; x++) { printf("%2d|",x); //first column ending with | for(y=1; y<=10; y++) { printf("%5d", x*y); //the actual multiplication } printf("\n"); //new line } return 0; }