Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
int main ()
{
int t = 0;
int i = 10000;
while (i > 0) {
t +=i;
i--;
}
printf ("%d\n", t);
#include <stdio.h>
int main ()
{
int t = 0;
for (int i = 0 ; i <= 10000 ; ++i)
t +=i;
printf ("%d\n", t);
return 0;
}