codechef CIELAB - "Ciel and A-B Problem": http://www.codechef.com/problems/CIELAB
my c++ solution to codechef CIELAB - "Ciel and A-B Problem": http://ideone.com/zPkaCz
#include <iostream>
using namespace std;
int main() {
// your code goes here
int a, b;
cin>>a>>b;
if((a-b)%10==9) cout<<(a-b)-1;
else cout<<(a-b)+1;
return 0;
}
sir can you give this programme in c language
ReplyDeletei don't see why you chose that if condition?
ReplyDeleteif((a-b)%10==0) cout<<(a-b)+1;
ReplyDeleteelse cout<<(a-b)-1;
The above condition is not working. Why?
is working bro
Deletebut explanation isnot clr
ReplyDelete