| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | |
| 7 | 8 | 9 | 10 | 11 | 12 | 13 |
| 14 | 15 | 16 | 17 | 18 | 19 | 20 |
| 21 | 22 | 23 | 24 | 25 | 26 | 27 |
| 28 | 29 | 30 | 31 |
Tags
- 게임제작
- 메이플스토리
- c언어 최대최소
- c샾 hello world
- c언어 배열 programming
- 2중 반복문
- c sharp hello world
- lua 다운로드
- N Queen 문제
- Lua란
- 루아
- LUA
- 비주얼 스튜디오 다운로드
- 비주얼 스튜디오
- c#온라인
- Lua language
- c++ 등차수열 합
- 유니티
- 루아다운로드
- N Queens Problem
- N Queen Coordinates
- lua download
- c언어 콘서트 배열 2번
- for문
- c언어 버블정렬
- c샾 헬로우 월드
- Lua 설명
- 온라인 비주얼 스튜디오
- C언어 달력
- c언어 콘서트 배열
Archives
- Today
- Total
Ln Go
C++ 2중 for문 등차수열 합 출력 본문

#include <stdio.h>
#include <iostream>
using namespace std;
int main()
{
int sum = 0;
int total = 0;
int k = 0;
for (int j = 1; j <= 10; j++) {
for (int i = 1; i <= j; i++) {
sum = sum + i;
}
cout << 1 << "~" << j << "까지의 합 : " << sum << endl;
total = total + sum;
sum = 0;
}
cout << "total=" << total;
}
'c++' 카테고리의 다른 글
| vector 선언 3종류 (0) | 2022.06.28 |
|---|---|
| N Queen Algorithm (0) | 2022.02.24 |
| c++ 문자열 대문자로 출력 (0) | 2021.09.15 |
| Online Compile Site (0) | 2021.06.03 |
| 비쥬얼 스튜디오 다운로드 (0) | 2020.04.13 |
Comments