์ƒ์„ธ ์ปจํ…์ธ 

๋ณธ๋ฌธ ์ œ๋ชฉ

[๋ฐฑ์ค€(BOJ)] 8393๋ฒˆ: ํ•ฉ (์ž…์ถœ๋ ฅ, C++)

PROGRAMMING/Algorithm

by koharin 2021. 2. 11. 13:13

๋ณธ๋ฌธ

728x90
๋ฐ˜์‘ํ˜•

๐Ÿ’ป C++ ์ œ์ถœ์ฝ”๋“œ


#include <stdio.h>
int main(){
    int n, sum=0;
    scanf("%d", &n);
    for(int i=1; i<=n; i++)sum += i;
    printf("%d", sum);
}

 

 

๐Ÿ‘ ๊ฒฐ๊ณผ


728x90
๋ฐ˜์‘ํ˜•

๊ด€๋ จ๊ธ€ ๋”๋ณด๊ธฐ