c++(72)
-
[C++] 함수오버로딩을 써서 계산기 함수를 만들어 보자
#include using namespace std; float Sum(float inputA, float inputB) { return inputA + inputB; } float Sub(float inputA, float inputB) { return inputA - inputB; } float Div(float inputA, float inputB) { if (inputB == 0) { cout
2022.05.31 -
[C++] 16. 2차원배열
#include using namespace std; void main() { int scoreA = 10; int scoreB = 20; int scoreC = 30; // 배열 : 메모리상에서 연속적으로 나열된 상태 int scores[] = { 10, 20, 30 }; cout
2022.05.31 -
[C++] 15. sizeof()
#include using namespace std; void main() { int num = 10; //sizeof(크기를측정하고싶은것) cout
2022.05.31 -
[C++] 다중for문을 써서 별을 찍어보자
#include using namespace std; void main() { cout
2022.05.31 -
[C++] 14. 배열
#include using namespace std; void main() { int scoreA = 70; int scoreB = 20; int scoreC = 90; int scoreD = 0; int scoreE = 80; // 배열 // index라는 개념이 있기때문에 바로 바로 참조 가능 int scores[] = { 70, 20, 90, 0, 80 }; int maxValue = 0; int maxIndex = 0; //sizeof cout
2022.05.30 -
[C++] 13. 포인터변수
#include using namespace std; void main() { int num = 10; // 포인터변수 : 주소를 담는 변수 cout
2022.05.30