#include <stdio.h>
#define N 0
int main(void) {
int sum = 0;
int current;
do {
printf("\n Enter an integer > ");
scanf("%d", ¤t);
if (current > N)
sum = sum + current;
} while (current > N);
printf("\nThe sum is %d\n", sum);
}
No comments:
Post a Comment