Why this code isn't working


Please reply asap

@aryangrover,

  • Line 29: You are printing local maximum value ā€˜d’ times, you just have to print the maximum value ones. Try putting the:

    cout<<maxd;

    outside the for loop.