what is wrong with my code , my output is showing correct #include using namespace std; int main() { long long int s,d,k,n; for(int i=0;i<10;i++) { cin>>s; cin>>d; k=(s+d)/2; n = s-k; cout<<k<<endl; cout<<n<<endl; } return 0; }
What problem is this for?
julka
Ha! Suppose I should have realised that!
Did you notice the maximum number of apples? long long int isn’t going to hold it.