我正在尝试打印"你好,数字5是正确的!" 在C.
我现在的方式是使用两个printf语句:
printf("Hello the number %d", number);
printf(" is correct!\n");
Run Code Online (Sandbox Code Playgroud)
如何在Java中的一个语句中执行此操作:
System.out.println("Hello the number "+number+" is correct!");
Run Code Online (Sandbox Code Playgroud)
我试过在C中这样做:
printf("Hello the number %d", number, " is correct!");
Run Code Online (Sandbox Code Playgroud)
但是"是对的!" 没有出现.
有没有办法在一个声明中这样做?对不起,我对C.很新.