Advertisement
gollub

Igraci, nba

Nov 15th, 2019
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 9.82 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. void Charlotte_Detroit(void);
  6. void Orlando_SanAntonio(void);
  7. void Memphis_Utah(void);
  8. void Minnesota_Washington(void);
  9. void Oklahoma_Philadelphia(void);
  10. void Houston_Indiana(void);
  11. void GoldenState_Boston(void);
  12. void LALakers_Sacramento(void);
  13.  
  14. int main () {
  15.    
  16.     time_t t;
  17.     srand((unsigned) time(&t));
  18.    
  19.     Charlotte_Detroit();
  20.     Orlando_SanAntonio();
  21.     Memphis_Utah();
  22.     Minnesota_Washington();
  23.     Oklahoma_Philadelphia();
  24.     Houston_Indiana();
  25.     GoldenState_Boston();
  26.     LALakers_Sacramento();
  27.    
  28.    return(0);
  29. }
  30. void Charlotte_Detroit()
  31. {
  32.     int domacin = rand() % 4 + 1;
  33.     int gost = rand() % 3 + 1;
  34.     int domacin_plus_minus = rand () % 2;
  35.     int gost_plus_minus = rand () % 2;
  36.    
  37.     switch(domacin)
  38.     {
  39.         default:
  40.             break;
  41.         case 1:
  42.             printf("1.Charlotte: Rozier T. ");
  43.             break;
  44.         case 2:
  45.             printf("1.Charlotte: Bridges M. ");
  46.             break;
  47.         case 3:
  48.             printf("1.Charlotte: Zeller C. ");
  49.             break;
  50.         case 4:
  51.             printf("1.Charlotte: Washington P. J. ");
  52.             break;
  53.     }
  54.     if(domacin_plus_minus)
  55.     {
  56.         printf("+\n");
  57.     }
  58.     else
  59.     {
  60.        printf("-\n");
  61.     }
  62.     switch(gost)
  63.     {
  64.         default:
  65.             break;
  66.         case 1:
  67.             printf("2.Detroit: Griffin B. ");
  68.             break;
  69.         case 2:
  70.             printf("2.Detroit: Drummond A. ");
  71.             break;
  72.         case 3:
  73.             printf("2.Detroit: Kennard L. ");
  74.             break;
  75.     }
  76.     if(gost_plus_minus)
  77.     {
  78.         printf("+\n");
  79.     }
  80.     else
  81.     {
  82.        printf("-\n");
  83.     }
  84.    
  85. }
  86. void Orlando_SanAntonio()
  87. {
  88.     int domacin = rand() % 4 + 1;
  89.     int gost = rand() % 5 + 1;
  90.     int domacin_plus_minus = rand () % 2;
  91.     int gost_plus_minus = rand () % 2;
  92.    
  93.     switch(gost)
  94.     {
  95.         default:
  96.             break;
  97.         case 1:
  98.             printf("3.San Antonio: Derozan D. ");
  99.             break;
  100.         case 2:
  101.             printf("3.San Antonio: Aldridge L. ");
  102.             break;
  103.         case 3:
  104.             printf("3.San Antonio: Forbes B. ");
  105.             break;
  106.         case 4:
  107.             printf("3.San Antonio: Gay R. ");
  108.             break;
  109.         case 5:
  110.             printf("3.San Antonio: Murray D. ");
  111.             break;
  112.     }
  113.     if(gost_plus_minus)
  114.     {
  115.         printf("+\n");
  116.     }
  117.     else
  118.     {
  119.        printf("-\n");
  120.     }
  121.     switch(domacin)
  122.     {
  123.         default:
  124.             break;
  125.         case 1:
  126.             printf("4.Orlando: Vucevic N. ");
  127.             break;
  128.         case 2:
  129.             printf("4.Orlando: Vucevic N. ");
  130.             break;
  131.         case 3:
  132.             printf("4.Orlando: Vucevic N. ");
  133.             break;
  134.         case 4:
  135.             printf("4.Orlando: Vucevic N. ");
  136.             break;
  137.     }
  138.     if(domacin_plus_minus)
  139.     {
  140.         printf("+\n");
  141.     }
  142.     else
  143.     {
  144.        printf("-\n");
  145.     }
  146.    
  147. }
  148. void Memphis_Utah()
  149. {
  150.     int domacin = rand() % 4 + 1;
  151.     int gost = rand() % 4 + 1;
  152.     int domacin_plus_minus = rand () % 2;
  153.     int gost_plus_minus = rand () % 2;
  154.    
  155.     switch(domacin)
  156.     {
  157.         default:
  158.             break;
  159.         case 1:
  160.             printf("5.Memphis: Jackson Jaren ");
  161.             break;
  162.         case 2:
  163.             printf("5.Memphis: Valanciunas J. ");
  164.             break;
  165.         case 3:
  166.             printf("5.Memphis: Brooks D. ");
  167.             break;
  168.         case 4:
  169.             printf("5.Memphis: Morant J. ");
  170.             break;
  171.     }
  172.     if(domacin_plus_minus)
  173.     {
  174.         printf("+\n");
  175.     }
  176.     else
  177.     {
  178.        printf("-\n");
  179.     }
  180.     switch(gost)
  181.     {
  182.         default:
  183.             break;
  184.         case 1:
  185.             printf("6.Utah: Mitchell D. ");
  186.             break;
  187.         case 2:
  188.             printf("6.Utah: Bogdanovic Bojan ");
  189.             break;
  190.         case 3:
  191.             printf("6.Utah: Conley M ");
  192.             break;
  193.         case 4:
  194.             printf("6.Utah: Gobert R. ");
  195.             break;
  196.     }
  197.     if(gost_plus_minus)
  198.     {
  199.         printf("+\n");
  200.     }
  201.     else
  202.     {
  203.        printf("-\n");
  204.     }
  205.    
  206. }
  207. void Minnesota_Washington()
  208. {
  209.     int domacin = rand() % 4 + 1;
  210.     int domacin_plus_minus = rand () % 2;
  211.    
  212.     switch(domacin)
  213.     {
  214.         default:
  215.             break;
  216.         case 1:
  217.             printf("7.Washington: Beal B. ");
  218.             break;
  219.         case 2:
  220.             printf("7.Washington: Hachimura R. ");
  221.             break;
  222.         case 3:
  223.             printf("7.Washington: Thomas I. ");
  224.             break;
  225.         case 4:
  226.             printf("7.Washington: Bryant T. ");
  227.             break;
  228.     }
  229.     if(domacin_plus_minus)
  230.     {
  231.         printf("+\n");
  232.     }
  233.     else
  234.     {
  235.        printf("-\n");
  236.     }
  237. }
  238. void Oklahoma_Philadelphia()
  239. {
  240.     int domacin = rand() % 5 + 1;
  241.     int gost = rand() % 5 + 1;
  242.     int domacin_plus_minus = rand () % 2;
  243.     int gost_plus_minus = rand () % 2;
  244.    
  245.     switch(domacin)
  246.     {
  247.         default:
  248.             break;
  249.         case 1:
  250.             printf("8.Oklahoma: Gilgeous-Alexander S. ");
  251.             break;
  252.         case 2:
  253.             printf("8.Oklahoma: Gallinari D. ");
  254.             break;
  255.         case 3:
  256.             printf("8.Oklahoma: Paul C. ");
  257.             break;
  258.         case 4:
  259.             printf("8.Oklahoma: Schored D. ");
  260.             break;
  261.         case 5:
  262.             printf("8.Oklahoma: Adams S. ");
  263.             break;
  264.     }
  265.     if(domacin_plus_minus)
  266.     {
  267.         printf("+\n");
  268.     }
  269.     else
  270.     {
  271.        printf("-\n");
  272.     }
  273.     switch(gost)
  274.     {
  275.         default:
  276.             break;
  277.         case 1:
  278.             printf("9.Philadelphia: Embiid J. ");
  279.             break;
  280.         case 2:
  281.             printf("9.Philadelphia: Harris T. ");
  282.             break;
  283.         case 3:
  284.             printf("9.Philadelphia: Horford A. ");
  285.             break;
  286.         case 4:
  287.             printf("9.Philadelphia: Richardson J. ");
  288.             break;
  289.         case 5:
  290.             printf("9.Philadelphia: Simmons B. ");
  291.             break;
  292.            
  293.     }
  294.     if(gost_plus_minus)
  295.     {
  296.         printf("+\n");
  297.     }
  298.     else
  299.     {
  300.        printf("-\n");
  301.     }
  302.    
  303. }
  304. void Houston_Indiana()
  305. {
  306.     int domacin = rand() % 3 + 1;
  307.     int gost = rand() % 3 + 1;
  308.     int domacin_plus_minus = rand () % 2;
  309.     int gost_plus_minus = rand () % 2;
  310.    
  311.     switch(domacin)
  312.     {
  313.         default:
  314.             break;
  315.         case 1:
  316.             printf("10.Houston: Harden J. ");
  317.             break;
  318.         case 2:
  319.             printf("10.Houston: Westbrook R. ");
  320.             break;
  321.         case 3:
  322.             printf("10.Houston: Tucker PJ. ");
  323.             break;
  324.     }
  325.     if(domacin_plus_minus)
  326.     {
  327.         printf("+\n");
  328.     }
  329.     else
  330.     {
  331.        printf("-\n");
  332.     }
  333.     switch(gost)
  334.     {
  335.         default:
  336.             break;
  337.         case 1:
  338.             printf("11.Indiana: Brogdon M. ");
  339.             break;
  340.         case 2:
  341.             printf("11.Indiana: Sabonis D. ");
  342.             break;
  343.         case 3:
  344.             printf("11.Indiana: Warren T.J ");
  345.             break;
  346.     }
  347.     if(gost_plus_minus)
  348.     {
  349.         printf("+\n");
  350.     }
  351.     else
  352.     {
  353.        printf("-\n");
  354.     }
  355.    
  356. }
  357. void GoldenState_Boston()
  358. {
  359.     int domacin = rand() % 4 + 1;
  360.     int gost = rand() % 4 + 1;
  361.     int domacin_plus_minus = rand () % 2;
  362.     int gost_plus_minus = rand () % 2;
  363.    
  364.     switch(domacin)
  365.     {
  366.         default:
  367.             break;
  368.         case 1:
  369.             printf("12.Golden State: Russel D. ");
  370.             break;
  371.         case 2:
  372.             printf("12.Golden State: Paschall E. ");
  373.             break;
  374.         case 3:
  375.             printf("12.Golden State: Green Draymond ");
  376.             break;
  377.         case 4:
  378.             printf("12.Golden State: Robinson G. ");
  379.             break;
  380.     }
  381.     if(domacin_plus_minus)
  382.     {
  383.         printf("+\n");
  384.     }
  385.     else
  386.     {
  387.        printf("-\n");
  388.     }
  389.     switch(gost)
  390.     {
  391.         default:
  392.             break;
  393.         case 1:
  394.             printf("13.Boston: Walker K. ");
  395.             break;
  396.         case 2:
  397.             printf("13.Boston: Brown J. ");
  398.             break;
  399.         case 3:
  400.             printf("13.Boston: Tatum J. ");
  401.             break;
  402.         case 4:
  403.             printf("13.Boston: Smart M. ");
  404.             break;
  405.     }
  406.     if(gost_plus_minus)
  407.     {
  408.         printf("+\n");
  409.     }
  410.     else
  411.     {
  412.        printf("-\n");
  413.     }
  414.    
  415. }
  416. void LALakers_Sacramento()
  417. {
  418.     int domacin = rand() % 4 + 1;
  419.     int gost = rand() % 4 + 1;
  420.     int domacin_plus_minus = rand () % 2;
  421.     int gost_plus_minus = rand () % 2;
  422.    
  423.     switch(gost)
  424.     {
  425.         default:
  426.             break;
  427.         case 1:
  428.             printf("14.Sacramento: Hield B. ");
  429.             break;
  430.         case 2:
  431.             printf("14.Sacramento: Barnes H. ");
  432.             break;
  433.         case 3:
  434.             printf("14.Sacramento: Bogdanovic Bogdan ");
  435.             break;
  436.         case 4:
  437.             printf("14.Sacramento: Bjelica N. ");
  438.             break;
  439.     }
  440.     if(gost_plus_minus)
  441.     {
  442.         printf("+\n");
  443.     }
  444.     else
  445.     {
  446.        printf("-\n");
  447.     }
  448.     switch(domacin)
  449.     {
  450.         default:
  451.             break;
  452.         case 1:
  453.             printf("15.LA Lakers: Davis A. ");
  454.             break;
  455.         case 2:
  456.             printf("15.LA Lakers: James L. ");
  457.             break;
  458.         case 3:
  459.             printf("15.LA Lakers: Bradley A. ");
  460.             break;
  461.         case 4:
  462.             printf("15.LA Lakers: Green Dany. ");
  463.             break;
  464.     }
  465.     if(domacin_plus_minus)
  466.     {
  467.         printf("+\n");
  468.     }
  469.     else
  470.     {
  471.        printf("-\n");
  472.     }
  473.    
  474. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement