#include #define MAX_SIZE 10000 // reads integers into an array from terminal until a number is entered // which when multiplied by another number previously entered // results in 56. // ./array_multiplied // 2 // 3 // 28 // 28 * 2 = 56 // ./array_multiplied // 99 // 4 // 1 // 7 // 56 // 56 * 1 = 56 // counter = 3 // 0 1 2 3 4 5 6 // 99 4 1 7 56 int main(void) { int array[MAX_SIZE]; int counter = 0; int found = 0; while (found == 0 && counter < MAX_SIZE && scanf("%d", &array[counter]) == 1 ){ for (int i = 0; i < counter && found == 0; i++) { if (array[i] * array[counter] == 56) { printf("%d * %d = 56\n", array[counter], array[i]); found = 1; } } counter++; } return 0; }