Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Calcolo delle tabelline da 1 a 10
- */
- #include <stdio.h>
- int main() {
- int tab[11][11]; // Array per memorizzare i valori
- int num,fatt; // num = numero della tabellina; fatt = numero per cui moltiplicare num. Es. se num = 5 e fatt = 7, allora num*fatt = 35
- for (num=1;num<=10;num++) {
- if (num == 1) {
- printf("--------------- TABELLINA DELL\' UNO -------------\n");
- }else if(num == 2){
- printf("--------------- TABELLINA DEL DUE -------------\n");
- }else if (num == 3) {
- printf("--------------- TABELLINA DEL TRE -------------\n");
- }else if(num == 4){
- printf("--------------- TABELLINA DEL QUATTRO -------------\n");
- }else if (num == 5) {
- printf("--------------- TABELLINA DEL CINQUE -------------\n");
- }else if(num == 6){
- printf("--------------- TABELLINA DEL SEI -------------\n");
- }else if(num == 7){
- printf("--------------- TABELLINA DEL SETTE -------------\n");
- }else if (num == 8) {
- printf("--------------- TABELLINA DELL\' OTTO -------------\n");
- }else if(num == 9){
- printf("--------------- TABELLINA DEL NOVE -------------\n");
- }else if (num == 10) {
- printf("--------------- TABELLINA DEL DIECI -------------\n");
- }
- for(fatt=0;fatt<=10;fatt++){
- tab[num][fatt] = num*fatt;
- printf("%d\n", tab[num][fatt]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement