printf("Enter the five numbers\n");
for(i=0;i<5;i++)
{
scanf("%d",&ar[i]);
sum=sum+ar[i];
}
printf("%d",sum);
return 0;
}my input is 1000000001,1000000002,1000000003,1000000004,1000000005 and the output is the sum of these numbers but the output it is showing is 705032719. Why???
Use long long int or long long
Cuz int overflow
Обсуждают сегодня