Here I have a very simple program:
printf("Enter your number in the box below
");
scanf("%d",&number);
Now, I would like the output to look like this:
Enter your number in the box below
+-----------------+
| |*| |
+-----------------+
Where, |*| is the blinking cursor where the user types their value.
Since C is a linear code, it won't print the box art, then ask for the output, it will print the top row and the left column, then after the input print the bottom row and right column.
So, my question is, could I possibly print the box first, then have a function take the cursor back into the box?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…