+ 1
Program for a bus service
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. Sample Input: 126 Sample Output: 24 Explanation: The first bus will transport 50 passengers, leaving 126-50=76 in the station. The next one will leave 26 in the station, thus, the last bus will take all of the 26 passengers, having 50-26=24 seats left empty Thank You =). I am Stuck in between the Codes can u Help :(
4 Antworten
0
Hey there Yash Saple,
Could you please add your attempt in your question? (link it at a code playground)
Thanks :)
0
Hey how to do that AsyncFox
0
Yash Saple can you please show us your code, your try? :)
Just create a new code, copy and paste your try there, save it, and share its link here. :)
0
See this was the Code :-
#include <iostream>
using namespace std;
int main() {
//your code goes here
if (int = "x");
cout<<"x = 126";
cout<<"x - 50";
print<<"x";
//Secoud Condition
if (int = "y");
cout<<"y = 50";
cout<<"y - 26";
print<<"y";
return 0;
}
I am not Understanding it at all :(
Hope it's ok '(