|
|
back to boardCommon Board1409 Two Gangester Posted by Saud 10 Nov 2011 19:30 #include<iostream> using namespace std; int main() { int h,l; cin>>h; cin>>l; if(h>=0 && h<=10 && l>=0 && l<=10) { cout<<10-h<<" "<<10-l<<endl; } return 0; } Sir kindly tell me why my this problem generete wrong outut at Test#2. ???? 1409 Two Gangester Posted by Saud 11 Nov 2011 18:03 Can anyone help me??? If Yes plz give me answer. I will be very thankful to him/her.
Re: 1409 Two Gangester Your code is wrong. Printing 10-h and 10-l is correct only for the sample input. You should think at a more general formula. 1409 Two Gangester Posted by Saud 12 Nov 2011 01:57 Sir kindly give me two or three more sample input cases. can you give me? |
|
|