Notice
Recent Posts
Recent Comments
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- vector
- queue
- 자료구조
- 아두이노 컴파일러
- 운영체제
- LineTracer
- set
- priority_queue
- directx
- arduino compiler
- Stack
- WinAPI
- Visual Micro
- c++
- 아두이노
- Arduino
- 시스템프로그래밍
- stl
- Algorithm
- 라인트레이서
- C언어
- Array
- html
- 수광 소자
- Deque
- 통계학
- map
- list
- 컴퓨터 그래픽스
- 아두이노 소스
Archives
- Today
- Total
Kim's Programming
2071. 평균값 구하기 본문
2071. 평균값 구하기
풀이 방법
<코드>
#include <iostream> #include <math.h> int main() { int n{0}; std::cin>>n; for(int testCase =1;testCase <=n;testCase ++) { int input{0}; float sum{0}; for(int i=0;i<10;i++) { std::cin>>input; sum +=input; } std::cout<<"#"<<testCase<<' '<< floor((sum/10) + 0.5) <<"\n"; } return 0; }
'SW ExpertAcademy > D1' 카테고리의 다른 글
| 2072. 홀수만 더하기 (0) | 2018.11.30 |
|---|---|
| 2070. 큰 놈, 작은 놈, 같은 놈 (0) | 2018.11.30 |
| 2068. 최대수 구하기 (0) | 2018.11.30 |
| 2063. 중간값 찾기 (0) | 2018.11.30 |
| 2058. 자릿수 더하기 (0) | 2018.11.30 |