-
C++연습] a 97~z122차례대로 출력하기 문자char 알파벳 숫자 출력코딩Coding/C++_연습 2021. 12. 2. 19:42728x90
#include <iostream> int main() { int i = 0; while (i < 26) { int val = 'a' + i; std::cout << char(val) << '\t' << int(val) << std::endl; ++i; } return 0; }
결론
출처:
Programming Principles & Practices Using C++ - Ch 04 'Try This' exercise
I'm a bit confused about this exercise in the above mentioned book- "The character 'b' is char('a'+ 1), 'c' is char('a'+ 2), etc. Use a loop to write out a table of characters with their correspo...
stackoverflow.com
반응형'코딩Coding > C++_연습' 카테고리의 다른 글
C++연습] Programming Challenge 77개 도전 gogo~ (0) 2021.12.03 C++연습] C++ Finding Smallest & Largest Integers(C++ While Loop) (0) 2021.12.03 C++연습]두 int를 읽어서 출력하는 while 루프로 이뤄진 프로그램 작성 (0) 2021.12.02 C++연습]대문자 소문자 차례대로 출력 (오른쪽으로 차례대로) (0) 2021.12.02 C++연습]달러 유료화 환율 변환 프로그램 만들기 (0) 2021.12.02 [C++연습]Calculator계산기 만들기 (0) 2020.12.22 C++연습_숫자 영어로 입력하면 숫자로 출력하기 (0) 2020.12.20 C++연습_숫자를 영어로 출력하기 (0) 2020.12.20