Dynamic Suit
Lesson 4 of 6 in Coddy's Playing Cards Generator (Text Based) course.
Playing cards have four kind of suits:
- clubs (♣)
- diamonds (♦)
- hearts (♥)
- spades (♠)
Challenge
EasyMake your printCard function get as input string that is "club" or "diamond" or "heart" or "spade" and prints Ace card with the dynamic suit (from the input).
Here are the symbols for your use:
♣, ♦, ♥, ♠
If the input string is not one of the four options above, the symbol should be a space (" ").
Try it yourself
#include <stdio.h>
void printCard() {
printf("╔═════════╗\n");
printf("║ A ║\n");
printf("║ ║\n");
printf("║ ║\n");
printf("║ ♥ ║\n");
printf("║ ║\n");
printf("║ ║\n");
printf("║ A ║\n");
printf("╚═════════╝\n");
}All lessons in Playing Cards Generator (Text Based)
1Introduction
Introduction