명품 C++ programming 13장 실습문제 10번


명품 C++ programming 13장 실습문제 10번

문제 다음 printline(int count) 함수는 한 줄에 count 개의 '*'를 출력하는 함수이다. #include<stdio.h> void printline(int count) { int n; for (n = 0; n < count; n++) printf("*"); printf("\n"); } 이 함수를 print.c 파일에 저장하라. 그리고 printline()을 호출하여 다음과 같이 화면에 출력하는 프로그램을 pr.cpp 파일로 작성하고, print.c와 pr.cpp 파일로 구성되는 프로젝트를 생성하여 실행하라. 실행결과 * ** *** 내가 짠 코드 #include<iostream>using namespace std;extern "C" void printline(int count);int main() { printline(1); printline(2); printline(3);}...



원문링크 : 명품 C++ programming 13장 실습문제 10번