#include <iostream>
int main()
{
using namespace std;
int auks,bats,coots;
auks = 19.99 + 11.99;
bats = (int) 19.99 + (int) 19.99;
coots = int(19.99) + int(19.99);
cout<<auks<<endl<<bats<<endl<<coots<<endl;
char ch = 'Z';
cout<<ch<<endl<<int(ch)<<endl<<static_cast<int>(ch)<<endl;
return 0;
}
3_14_p56_typecast.cpp
于 2024-07-08 00:41:42 首次发布