How do u make card symbols such as hearts, spades, clovers, and dimonds in C?
How do u make card symbols such as hearts, spades, clovers, and dimonds in C?
use the Decimal number that the symbol has, define the symbol, and then use the character
for example, to print a line of Spades
Code:/*#include <stdio.h> #define symbol 06 main() { int row; for(row = 1; row <= 60; ++row) printf("%c", symbol); }
clovers? or clubs?
find the ascii chart
The characters you refer to outside of the standard printable range, but none the less, are still generated on some DOS screens. If you are getting a spade for 6, you might find that 3, 4 and 5 are the other numbers you require.
This is however a non-portable way of doing things, meaning you aren't guaranteed to see these characters on other platforms.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]