0

Why it wrong?

#include <iostream> using namespace std; int main() { //your code goes here int max = 50; int passengers; cin >> passengers; //m : max //p : passengers cout << max - (passengers - (max * (passengers / max)));//o its work //m -{p - m(p÷m)} //m-(p -mp) //m-p+ mp // cout << max -passengers + (max * passengers);//x wrong code return 0; }

12th May 2021, 4:11 AM
SorryPark
1 ответ
+ 1
Just do this nothing else. cout << (max - passengers % max);
12th May 2021, 4:18 AM
A͢J
A͢J - avatar