Print sum of first 100 integers. (With data validation)
#include <stdio.h> int main() { int sum=0,i; for(i=1;i<=100;i++){ sum+=i; } printf("The sum of first 100 integers is %d\n\n",sum); scanf("%d", &sum); return 0; }
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!