#include int main(void) { int N; printf("Nを入力してください。"); scanf("%d", &N); printf("%d", (N * (N + 1)) / 2); rewind(stdin); getchar(); return 0; }