
/**//************************************************************************/
/**//* 輸出常用的ASCII碼表 */
/**//************************************************************************/
#include "iostream.h"
int main()

{
for (int i=32;i<=127;i++)
{
cout<<(char)i; //強制類型轉換
}
return 0;
}

#include "iostream.h"
#include "iomanip.h"//為了使用setw()
int main()

{
char temp;
for (int i=32;i<=127;i++)
{
temp = i;
cout<<setw(2)<<temp; //setw(n) 設域寬為n個字符
if (i%16==15)
{
cout<<endl;
}
}
return 0;
}! " # $ % & ' ( ) * + , - . /
0 1 2 3 4 5 6 7 8 9 : ; < = > ?
@ A B C D E F G H I J K L M N O
P Q R S T U V W X Y Z [ \ ] ^ _
` a b c d e f g h i j k l m n o
p q r s t u v w x y z { | } ~
Press any key to continue

