如何接受3个参数作为int

fri*_*nds 0 c

例如:

console> please enter 3 digits: 1 2 3
Run Code Online (Sandbox Code Playgroud)

我只知道如何接受1位数scanf:

scanf("%d", &space);
Run Code Online (Sandbox Code Playgroud)

Bri*_*nts 8

您可以使用scanf读取多个数字

int a, b, c;
scanf("%d %d %d", &a, &b, &c);
Run Code Online (Sandbox Code Playgroud)