일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 조건문
- sql injection
- document
- 백준 알고리즘
- 배열
- github
- 자바스크립트
- lord of sql injection
- python
- 함수
- 백준 파이썬
- window
- blind sql injection
- xss game 풀이
- property
- 메소드
- xss game
- object
- jQuery
- 사칙연산
- 객체
- 김성엽 대표님
- Pwndbg
- 파이썬
- element 조회
- 포인터
- htmlspecialchars
- burp suite
- IF문
- suninatas 풀이
Archives
- Today
- Total
power-girl0-0
[ C++ ] 반 평균 구하기 본문
728x90
#include <iostream> using namespace std; int main(){ string name; const int student = 5; int score[student], sum; cout << "지도 교수명 : "; getline(cin,name); cout << endl; for(int i=0; i<student; i++){ cout<<i+1<<"번 학생 점수를 입력해주세요."<<endl; cin>>score[i]; sum += score[i]; } cout << endl<<"지도교수명 : "<<name <<endl; cout << "합 : "<<sum<<", 평균 : "<<(float)sum/student<<endl; }
728x90
'언어 > C++' 카테고리의 다른 글
[ C++ ] 클래스 & 객체 (0) | 2021.03.23 |
---|---|
[ C++ ] 해밍코드 거리 구하기 (0) | 2021.03.23 |
[ C++ ] 랜덤한 수 합 맞추기 (0) | 2021.03.23 |
[ C++ ] 문자를 입력받아 모음과 자음 수 구하기 (0) | 2021.03.23 |
[ C++ ] 랜덤 수 & 최대값 & 정렬 (0) | 2021.03.16 |
Comments