명품 C++ programming 실습 문제 11장 11번
문제 : 다음은 프로그램과 실행 결과를 보여준다. pos 조작자를 작성하라. 1 2 3 4 5 6 7 8 9 #include using namespace std; int main() { int x, y; cin » pos » x; cin » pos » y; cout « x « ‘,’ « y « endl; } 실행 결과 : 목적 및 힌트 : 조작자 작성 연습 코드 : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #include using namespace std; istream& pos (istream& ins) { // pos 조작자 cout « “위치는? “; return ins; } int main() { int x, y; cin » pos » x; cin » pos » y; cout « x « ‘,’ « y « endl; } 공유하기 ...