hljs.initHighlightingOnLoad();

풀이

C++

[C++ 기초 플러스] Chapter 08 프로그래밍 연습 풀이

01.(문제를 잘 이해한 게 맞는지 모르겠다.)// 책에 서술된 대로 구현#include #include using namespace std;int cnt;void print(const string* s, int n = 0){ if (n == 0) { cnt++; cout > "; cout > "; cout  결과02.// 책에 서술된 대로 구현#include #include using namespace std;struct CandyBar{ string maker; double weight; int calories;};void SetCandyBar( CandyBar& candyBar, const char* ca..

C++

[C++ 기초 플러스] Chapter 07 프로그래밍 연습 풀이

본 풀이는 제가 공부하면서 작성한 것이므로 정답이 아닐 수도 있습니다. 01.// 쌍을 이루는 두 수를 반복해서 입력할 것을 사용자에게 요구하는 프로그램// 두 수 중 적어도 어느 하나가 0으로 입력될 때까지 입력은 계속됨#include using namespace std;float HarmonicMean(int x, int y){ float a = static_cast(x); float b = static_cast(y); return 2.0f * a * b / (a + b);}int main(){ int m, n; cout > m >> n)) { cout 결과01 - 1. cin.ignore(100, '\n')의 의미더보기 입력 스트림에..

(ꐦ •᷄ࡇ•᷅)
'풀이' 태그의 글 목록