#include using namespace std; int main() { char c; int i; short s; long l; float f; double d; long double ld; unsigned int ui; c = 'A'; // 文字は'でくくる. i = 10; s = 20; l = 30l; // 最後のlはlong型を示す. f = 1.23f; // 最後のfはfloat型を示す. d = 2.34; ld = 3.45l; // 最後のlはlong double型を示す. ui = 40u; // 最後のuはunsigned型を示す. cout << "char: " << c << endl; cout << "int: " << i << endl; cout << "short: " << s << endl; cout << "long: " << l << endl; cout << "float: " << f << endl; cout << "double: " << d << endl; cout << "long double: " << ld << endl; cout << "unsigned int: " << ui << endl; return 0; }