clc
clear

disp 'Taylor Waller'

price_A = [19, 18, 22, 21, 25, 19, 17, 21, 27, 29];
price_B = [22, 17, 20, 19, 24, 18, 16, 25, 28, 27];
price_C = [17, 13, 22, 23, 19, 17, 20, 21, 24, 28];

days_a = sum((price_A > price_B) & (price_A > price_C));
days_b = sum((price_A > price_B) | (price_A > price_C));
days_c = sum(xor(price_A > price_B, price_A > price_C));

fprintf('Part a: %d days\n', days_a);
fprintf('Part b: %d days\n', days_b);
fprintf('Part c: %d days\n', days_c);

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: