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 | 31 |
Tags
- 프로그래머스
- Python
- java정리
- 자바
- 개발자
- 개발
- backend
- 코딩테스트
- 프로그램
- 코딩
- 프로그래밍
- 자바정리
- java
- 코테
- 백준
- 주가예측
- C++
- 풀스택프레임워크
- 모의 주식
- Reflex
- Project
- 사물인터넷
- 코스닥
- SNS
- 이웃한 칸
- 개인프로젝트
- 자바독학
- 코딩독학
- 빅데이터
- frontend
Archives
- Today
- Total
Creative Code
procScore.c (배열 성적평균구하기) 본문
#include <stdio.h>
int main(void)
{
int scores[5];
for (int i = 0; i<5; i++) {
scanf("%d",&scores[i]);
}
int total = 0;
for (int i =0; i<5; i++) {
total += scores[i];
}
double average = (double)total/5.0;
printf("total : %d\t average : %.2f\n",total,average);
return 0;
}
'C Programming' 카테고리의 다른 글
multiplyTable.c (구구단) (0) | 2023.08.01 |
---|---|
absoluteValue2.c (절댓값 구하기-삼항연산자) (0) | 2023.08.01 |
oddEven.c (홀수,짝수 판별) (0) | 2023.07.31 |
maxMidMin.c (최대,중간,최소값 구하기) (0) | 2023.07.31 |
letterAttribute.c (비트연산) (0) | 2023.07.31 |