
% Lab 2 Solutions
% CS 1109, Summer 2011
% July 1

% This script prompts the user for two numbers and outputs their
% average

num1 = input('Enter the first number: ');
num2 = input('Enter the second number: ');

% Compute the average
mean = (num1 + num2) / 2;

fprintf('The average of %g and %g is %g\n', num1, num2, mean);

