Yahoo Answers is shutting down on 4 May 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

How would you write a C Code to represent any card from a deck using the gd.h library?

1 Answer

Relevance
  • ?
    Lv 7
    8 years ago
    Favourite answer

    no need for outside librarys. (A header file is not a library -- just the prototypes and macros)

    here is what i would do

    int deck[52], card,suit;

    fill deck with numbers 1 to 52

    ..

    card=deck[n]/13;

    suit=deck[n]%4;

Still have questions? Get answers by asking now.