返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<string>
  4. using namespace std;
  5. int main()
  6. {
  7.   char c[100];
  8.   cout<<"請施入字串:";
  9.   cin.getline(c,100);
  10.   cout<<"這串字串的ASCLL碼為:";
  11.   for(int i=0;c[i]!=NULL;i++)
  12.   {
  13.           cout<<int(c[i])<<"\t";
  14.   
  15.   }
  16.     cout<<endl;
  17.     system("pause");
  18.     return 0;
  19. }
複製代碼

TOP

返回列表