[問題] scanf xcode
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
xcode
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
no
問題(Question):
無法讀取輸入的數字
餵入的資料(Input):
1 1 3
預期的正確結果(Expected Output):
3
錯誤結果(Wrong Output):
(lldb) 1 1 3
error: '1' is not a valid command.
(lldb)
程式碼(Code):(請善用置底文網頁, 記得排版)
#include <stdio.h>
#include <stdlib.h>
int main(){
int row,col,num[2][2];
scanf("%d",&col);
scanf("%d",&row);
scanf("%d",&num[row][col]);
printf("%d",num[row][col]);
return 0;
}
補充說明(Supplement):
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.51.112
→
08/31 23:32, , 1F
08/31 23:32, 1F
→
09/01 00:12, , 2F
09/01 00:12, 2F
→
09/01 01:39, , 3F
09/01 01:39, 3F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章