|
|
back to boardCommon BoardShow all messages Hide all messages#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. ???? Can anyone help me??? If Yes plz give me answer. I will be very thankful to him/her.
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. Sir kindly give me two or three more sample input cases. can you give me? |
|
|