CSC 171 - Introduction to Computer Programming

Assignment #3 - How many seats are left in a classroom?

Due Friday, September 15, 2023

You work for the Registrar's office and have to know if there are any seats available in a classroom and if so how many?

Write a program that reads two (2) inputs: the number of students in a class and the number of total seats in the classroom.

If there are still available seats in the classroom, print the number of available seats. If there aren't any seats available, print a message to that effect.

Please make sure that your program checks for bad data, i.e., that neither the number of students nor the number of seats is negative.

[Back to the Assignment List]