LPC 數值轉型 - MUD Game
By Steve
at 2018-06-23T12:26
at 2018-06-23T12:26
Table of Contents
float pi = 3.14;
int i = (int) pi;
if (intp(i)) {
printf("It's INT, i = %d\n", i);
} else if (floatp(i)) {
printf("It's FLOAT, i = %f\n", i);
} else if (stringp(i)) {
printf("It's STRING, i = \"%s\"\n", i);
}
猜猜上面這段 LPC 會印出哪一種結果
--
int i = (int) pi;
if (intp(i)) {
printf("It's INT, i = %d\n", i);
} else if (floatp(i)) {
printf("It's FLOAT, i = %f\n", i);
} else if (stringp(i)) {
printf("It's STRING, i = \"%s\"\n", i);
}
猜猜上面這段 LPC 會印出哪一種結果
--
Tags:
線上
All Comments
By Hedwig
at 2018-06-25T21:51
at 2018-06-25T21:51
By Necoo
at 2018-06-30T09:49
at 2018-06-30T09:49
By Tracy
at 2018-07-03T04:55
at 2018-07-03T04:55
By Puput
at 2018-07-06T19:12
at 2018-07-06T19:12
By Ida
at 2018-07-08T07:41
at 2018-07-08T07:41
By Connor
at 2018-07-10T00:11
at 2018-07-10T00:11
By Ula
at 2018-07-13T09:51
at 2018-07-13T09:51
By Erin
at 2018-07-15T17:02
at 2018-07-15T17:02
By Mary
at 2018-07-19T06:14
at 2018-07-19T06:14
By Barb Cronin
at 2018-07-22T10:30
at 2018-07-22T10:30
By Enid
at 2018-07-23T11:54
at 2018-07-23T11:54
By Skylar Davis
at 2018-07-28T09:26
at 2018-07-28T09:26
By Isabella
at 2018-08-01T07:49
at 2018-08-01T07:49
Related Posts
今晚7時 しゃどばすチャンネルSP第8回
By William
at 2018-06-23T10:38
at 2018-06-23T10:38
新卡(待確認)1張
By Skylar DavisLinda
at 2018-06-23T05:46
at 2018-06-23T05:46
求推薦RPG遊戲
By Elvira
at 2018-06-23T03:23
at 2018-06-23T03:23
Are you ready?
By Skylar DavisLinda
at 2018-06-22T20:51
at 2018-06-22T20:51
6月27日23:00~6月28日06:00維護公告
By Skylar Davis
at 2018-06-22T18:46
at 2018-06-22T18:46