Solution Idea This solution idea is for CS101. To get maximum numbers, you should read the whole document carefu…