|
|
back to boardDiscussion of Problem 1607. TaxiWA c++ help Posted by Barbs 12 Feb 2015 18:46 #include <iostream> using namespace std; int main(){ int a,b,c,d,k=0; cin >> a >> b >> c >> d; while(a<c){ if(k==0){ k = 1; a += b; cout << a << " "; } else { k = 0; c -= d; cout << c << " "; } } cout << a ; return 0; } |
|
|