Value not being updated

The Code is not updating the value of maxsum

Hey @bhavay77900

    for (int i=0;i<n;i++)
    {
        cin >> a[i];//this is a[i] not a[n]
    }

If this resolves your query then please mark it as resolved :slight_smile:

1 Like