-4
非常感谢您提供任何帮助。我试图根据M和N给出的值来打印“+”符号的棋盘(因此,如果它是M:3和N:1,它会以+++出现),但我正在绘制绝对空白你如何做到这一点。代码在C.在C中打印符号
编辑:澄清。我不记得基于给定的值打印电路板需要做什么。我很清楚,如果我现在运行这些代码,它会显得空白。
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main() {
int N, M;
printf("N: ");
scanf("%d",&N);
printf("M: ");
scanf("%d",&M);
printf("\n");
/* Show a board with N lines and M columns */
return 0;
}
年会需要一定的循环,对于'(...)'等http://www.programiz.com/c-programming/c-for -loop – pm100
printf(“\ n”);肯定会打印一个新的行。所以当你不打印任何东西,而是一条新线时,你怎么能期望看到除了新线以外的任何东西。 – reshad
空白行有目的,空间的东西。 – Kuro