- 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.

20th Mar 2022, 12:32 PM
Shahbaz
Shahbaz - avatar
4 odpowiedzi
+ 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; }
20th Mar 2022, 1:06 PM
Shahbaz
Shahbaz - avatar
0
What's not you understood there? Try yourself first and post your attempt..!!!
20th Mar 2022, 12:46 PM
Jayakrishna 🇮🇳
0
I completed it myself
20th Mar 2022, 1:07 PM
Shahbaz
Shahbaz - avatar
0
👍 Happy learning..
20th Mar 2022, 1:13 PM
Jayakrishna 🇮🇳