|
|
back to boardWrong answer Posted by Pavel 24 Feb 2015 16:31 why wrong answer? #include <iostream> using namespace std; int main() { int banki=10, banki_s, bankis_ss; cout << "Harry shot cans: "; cin >> banki_s; cout << "Larry shot cans: "; cin >> bankis_ss; cout << "Harry shot: " << (banki - banki_s) << endl; cout << "Larry shot: " << (banki - bankis_ss) << endl;
return 0; } Re: Wrong answer Posted by Pavel 24 Feb 2015 16:47 int main() { code: int banki, banki_s, bankis_ss; cout << "Harry shot cans: "; cin >> banki_s; cout << "Larry shot cans: "; cin >> bankis_ss; banki = (banki_s + bankis_ss) - 1; cout << "Harry shot: " << (banki - banki_s) << endl; cout << "Larry shot: " << (banki - bankis_ss) << endl; system("PAUSE"); return 0; } |
|
|