編寫函數,用遞歸法將一個n位整數轉換爲n個相應的字符

#include<iostream> using namespace std; void intToChar(int n); void main() { int n; cout << "請輸入一個整數" << endl; cin >> n; cout << "整數" << n << "轉換爲字符" << endl; if (n < 0) { n = -n; cout << '-' << endl;
相關文章
相關標籤/搜索