The Code is not updating the value of maxsum
Value not being updated
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
1 Like