Hi,I'm a beginner with C.
And a Bit confused with the Following Snippet,can you guys help?
Code Snippet
The Following Function Excepts 25 Numbers from the Keyboard & Prints the sum of the +ve Number's
Questions#include <stdio.h>
main()
{int i,sum,num;
for(i=0;i<25;i=i+1)
{
puts("Enter a Number");
scanf("%d,& num");
fflush(stdin);
if(num <=0) /* non positive numbers*/
continue;
sum=sum+num
}
printf("The sum of positive numbers entered is %d\n",sum);
}
1.can you Explain "sum=sum+num"
2.Can you give me a clear idea of things? and explain to me the function in detail,please!
Thanks for the Help,