Wsp c people.code below's supposed to printout the sum of all integers less than and including the limit specified by user.Something' s missing or wrong_ I jus can't figure out what, pls help.
#include<stdio. h>
main ()
{
int limit,i,sum;
printf("Input limit:");
scanf("%d",&lim it);
for(i=limit;i>0 ;i--)
sum=sum+i;
printf("%d\n",s um);
}
#include<stdio. h>
main ()
{
int limit,i,sum;
printf("Input limit:");
scanf("%d",&lim it);
for(i=limit;i>0 ;i--)
sum=sum+i;
printf("%d\n",s um);
}
Comment