/* Program to decide which promotional literature to mail. */ #include void message (char name1[], char name2[], int age); main () { char firstname[40], surname[40]; int age; printf("Enter First name, surname, and age: "); scanf("%39s %39s %d", firstname, surname, &age); message(firstname, surname, age); } void message (char name1[], char name2[], int age) { printf("%s %s should be ", name1, name2); if (age < 7) { printf("deleted from the mailing list.\n"); } else { printf("sent the "); if (age <= 15) { printf("toy"); } else if (age < 25) { printf("youth"); } else if (age <= 50) { printf("adult"); } else { printf("mature ages"); } printf(" catalog.\n"); } }