- 3
Can anyone help?
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.
4 Answers
+ 1
#include <iostream>
using namespace std;
int main() {
int a,rem;
int b=50;
cout<< "Enter number of passenegers"<<endl;
cin>>a;
rem=a%b;
int bs=50-rem;
cout<<"Number of empty seats in bus ";
cout<<bs<<endl;
return 0;
}
0
What's not you understood there?
Try yourself first and post your attempt..!!!
0
I completed it myself
0
đ
Happy learning..