#include <stdio.h>
//課題B-1: 1からnまでの和を求めるコードを完成させてください
int sum(int n){
int c,d;
for(c=0;c<=n;c++){
d+=c;
}
return d;
}
int main(void) {
int a,b;
a = 10;
b = sum(a);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v6Kqy6aGMQi0xOiAx44GL44KJbuOBvuOBp+OBruWSjOOCkuaxguOCgeOCi+OCs+ODvOODieOCkuWujOaIkOOBleOBm+OBpuOBj+OBoOOBleOBhAppbnQgc3VtKGludCBuKXsKCWludCBjLGQ7Cglmb3IoYz0wO2M8PW47YysrKXsKCQlkKz1jOwp9CglyZXR1cm4gZDsKfQoKaW50IG1haW4odm9pZCkgewoJaW50IGEsYjsKICAgIGEgPSAxMDsKICAgIGIgPSBzdW0oYSk7CiAgICBwcmludGYoIjHjgYvjgoklZOOBvuOBp+OBruWSjOOBryVkIiwgYSxiICk7CglyZXR1cm4gMDsKfQo=