fork download
  1. #include <stdio.h>
  2.  
  3. struct Kodowanie {
  4. int miejsce;
  5. int ilosc;
  6. };
  7. typedef struct Kodowanie Kodowanie;
  8.  
  9. Kodowanie szyfr[256];
  10. void init(void) {
  11. /* Tutaj wypelniamy tablice szyfr wartosciami, np.: */
  12. szyfr['a'].miejsce = 2;
  13. szyfr['a'].ilosc = 1;
  14. /* Mozna tez zrobic jakas petle. */
  15. }
  16.  
  17. int main(void) {
  18. init();
  19.  
  20. printf("a -> %d%d\n", szyfr['a'].miejsce, szyfr['a'].ilosc);
  21.  
  22. return 0;
  23. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
a -> 21