0

Please help me in C++ first program

Please find the error, this is not work properly. #include <iostream> using namespace std; int main() { int passengers = 126; int empty_seats = 0; //passengers =126; passengers after 1st bas leaving= passengers - 50; passengers after 2nd bas leaving= passengers - 50; passengers after 3rd bas= passengers; empty_seats= 50 % passengers; cout << "Empty seats in last bas"<< empty_seats <<endl; return 0; }

30th Nov 2020, 11:10 AM
Noman Saqib
Noman Saqib - avatar
4 odpowiedzi
+ 4
Read the task carefully. We have to take input for no of passengers first then we have to compute the remaining passengers through Remaining = maximum number of seats - ( passengers%maximum numberof seats)
30th Nov 2020, 11:27 AM
Simba
Simba - avatar
0
No sir brackets are correct please
30th Nov 2020, 11:17 AM
Noman Saqib
Noman Saqib - avatar
0
Places
30th Nov 2020, 11:17 AM
Noman Saqib
Noman Saqib - avatar