You are making a program for a bus service. a bus can transport 50 passengers at once. given the number of passengers waiting in the bus station as input, you need to calculate and output how many empty seats the last bus will have.

Respuesta :

The program to  a person will need to calculate and output the amount of empty seats the last bus will have is written below

What is the program about?

The program to use in the bus service calculation is:

#include <iostream>

using namespace std;

int main()

{

int passengers;

cout << "";

cin >> passengers ;

int left_passengers= passengers % 50;

if(left_passengers == 0){

   

   cout << "0 seats left";

}

else{

int left_seats= 50 - left_passengers;

   

   cout << left_seats;

   cout << "";

}

   

return 0;

}

One can also write the code as:

#include <iostream>

using namespace std;

int main()

{

int pass, empty_seats;

cin>>pass;

pass=pass%50;

empty_seats=50-pass;

cout<<empty_seats;

return 0;

Learn more about program from

https://brainly.com/question/16397886

#SPJ1

ACCESS MORE
EDU ACCESS
Universidad de Mexico