1 2 3 4 5 6 7 8 9
//chapter 6 Ex 6 clc; clear; close; persons=9; extra=8; avgexp=(12*(persons-1)+extra)/(persons-1); total=9*avgexp; mprintf("The total money spent was Rs.%d",total);