//chapter 6 Ex 5 clc; clear; close; Atotal=36; Btotal=44; avgA=40; avgB=35; avg=(Atotal*avgA+Btotal*avgB)/(Atotal+Btotal); mprintf("The average weight of whole class is %.2f kilograms",avg);