c언어
정보 올림피아드 - 541
명용
2016. 7. 28. 22:55
문자를 입력받아서 입력받은 문자를 20번 반복하여 출력하는 프로그램을 작성하시오.
![]() A | ![]() AAAAAAAAAAAAAAAAAAAA |
1 2 3 4 5 6 7 8 9 10 11 12 13 | #include <stdio.h> #include <stdlib.h> int main() { char a; int b = 1; scanf_s("%d", &b); scanf_s("%c", &a); for (b = 1; b <= 20; b++) { printf("%c", a); } return 0; system("pause"); } | cs |