Reputation: 3
the codes below represent output of coordinates,for example it'll show faces_x=201 etc. However,they are all displayed vertically. How to print them on the console horizontally?
printf("faces_x=%d\n", faces[i].x);
printf("faces_y=%d\n", faces[i].y);
Upvotes: 0
Views: 281
Reputation: 60208
If you simply remove the newlines, i.e. \n
, the 2 lines will be printed horizontally:
printf("faces_x=%d", faces[i].x);
printf("faces_y=%d", faces[i].y);
Note that your question doesn't actually need the second \n
to be removed, unless you want the following output to start on a new line.
Upvotes: 1