#include<stdio.h> int main() { int sum = 0; int number = 1; int i = 1; while (i <= 100) { sum = sum + number; number = number + 1; i = i + 1; } printf("sum=%d",sum); return 0; }
#include<stdio.h> int main() { int sum = 0; int number = 1; int i = 1; while (i <= 100) { sum = sum + number; number = number + 1; i = i + 1; } printf("sum=%d",sum); return 0; }