program banquet; uses crt; {-------------------------------------------------------------------------- program description This program will ask the user how many people need to be seated per table, how many people (total) need to be seated, and then calculate how many tables you will need and how many people will be left over --------------------------------------------------------------------------} VAR remain:integer ; total:integer ; per:integer ; table:integer ; begin clrscr; textcolor (red + blink); writeln ('WELCOME TO THE BANQUET CALCULATOR!'); textcolor (green); writeln; write ('How many people are invited to your banquet? ---> ') ; readln (total); writeln; writeln; write ('How many people do you want at each table? ---> '); readln (per) ; writeln; table := total div per ; remain := total mod per ; if remain > 0 then table := table + 1; writeln; writeln ('--------------------------------------------------------------') ; writeln; writeln ('You will need ',table,' tables.') ; if remain > 0 then writeln (per,' people will be at each table, with ',remain,' people at the last one.'); if remain < 1 then writeln (per,' people will be at each table.') ; writeln; writeln ('--------------------------------------------------------------') ; readln; end.