Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- void Charlotte_Detroit(void);
- void Orlando_SanAntonio(void);
- void Memphis_Utah(void);
- void Minnesota_Washington(void);
- void Oklahoma_Philadelphia(void);
- void Houston_Indiana(void);
- void GoldenState_Boston(void);
- void LALakers_Sacramento(void);
- int main () {
- time_t t;
- srand((unsigned) time(&t));
- Charlotte_Detroit();
- Orlando_SanAntonio();
- Memphis_Utah();
- Minnesota_Washington();
- Oklahoma_Philadelphia();
- Houston_Indiana();
- GoldenState_Boston();
- LALakers_Sacramento();
- return(0);
- }
- void Charlotte_Detroit()
- {
- int domacin = rand() % 4 + 1;
- int gost = rand() % 3 + 1;
- int domacin_plus_minus = rand () % 2;
- int gost_plus_minus = rand () % 2;
- switch(domacin)
- {
- default:
- break;
- case 1:
- printf("1.Charlotte: Rozier T. ");
- break;
- case 2:
- printf("1.Charlotte: Bridges M. ");
- break;
- case 3:
- printf("1.Charlotte: Zeller C. ");
- break;
- case 4:
- printf("1.Charlotte: Washington P. J. ");
- break;
- }
- if(domacin_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- switch(gost)
- {
- default:
- break;
- case 1:
- printf("2.Detroit: Griffin B. ");
- break;
- case 2:
- printf("2.Detroit: Drummond A. ");
- break;
- case 3:
- printf("2.Detroit: Kennard L. ");
- break;
- }
- if(gost_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- }
- void Orlando_SanAntonio()
- {
- int domacin = rand() % 4 + 1;
- int gost = rand() % 5 + 1;
- int domacin_plus_minus = rand () % 2;
- int gost_plus_minus = rand () % 2;
- switch(gost)
- {
- default:
- break;
- case 1:
- printf("3.San Antonio: Derozan D. ");
- break;
- case 2:
- printf("3.San Antonio: Aldridge L. ");
- break;
- case 3:
- printf("3.San Antonio: Forbes B. ");
- break;
- case 4:
- printf("3.San Antonio: Gay R. ");
- break;
- case 5:
- printf("3.San Antonio: Murray D. ");
- break;
- }
- if(gost_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- switch(domacin)
- {
- default:
- break;
- case 1:
- printf("4.Orlando: Vucevic N. ");
- break;
- case 2:
- printf("4.Orlando: Vucevic N. ");
- break;
- case 3:
- printf("4.Orlando: Vucevic N. ");
- break;
- case 4:
- printf("4.Orlando: Vucevic N. ");
- break;
- }
- if(domacin_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- }
- void Memphis_Utah()
- {
- int domacin = rand() % 4 + 1;
- int gost = rand() % 4 + 1;
- int domacin_plus_minus = rand () % 2;
- int gost_plus_minus = rand () % 2;
- switch(domacin)
- {
- default:
- break;
- case 1:
- printf("5.Memphis: Jackson Jaren ");
- break;
- case 2:
- printf("5.Memphis: Valanciunas J. ");
- break;
- case 3:
- printf("5.Memphis: Brooks D. ");
- break;
- case 4:
- printf("5.Memphis: Morant J. ");
- break;
- }
- if(domacin_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- switch(gost)
- {
- default:
- break;
- case 1:
- printf("6.Utah: Mitchell D. ");
- break;
- case 2:
- printf("6.Utah: Bogdanovic Bojan ");
- break;
- case 3:
- printf("6.Utah: Conley M ");
- break;
- case 4:
- printf("6.Utah: Gobert R. ");
- break;
- }
- if(gost_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- }
- void Minnesota_Washington()
- {
- int domacin = rand() % 4 + 1;
- int domacin_plus_minus = rand () % 2;
- switch(domacin)
- {
- default:
- break;
- case 1:
- printf("7.Washington: Beal B. ");
- break;
- case 2:
- printf("7.Washington: Hachimura R. ");
- break;
- case 3:
- printf("7.Washington: Thomas I. ");
- break;
- case 4:
- printf("7.Washington: Bryant T. ");
- break;
- }
- if(domacin_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- }
- void Oklahoma_Philadelphia()
- {
- int domacin = rand() % 5 + 1;
- int gost = rand() % 5 + 1;
- int domacin_plus_minus = rand () % 2;
- int gost_plus_minus = rand () % 2;
- switch(domacin)
- {
- default:
- break;
- case 1:
- printf("8.Oklahoma: Gilgeous-Alexander S. ");
- break;
- case 2:
- printf("8.Oklahoma: Gallinari D. ");
- break;
- case 3:
- printf("8.Oklahoma: Paul C. ");
- break;
- case 4:
- printf("8.Oklahoma: Schored D. ");
- break;
- case 5:
- printf("8.Oklahoma: Adams S. ");
- break;
- }
- if(domacin_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- switch(gost)
- {
- default:
- break;
- case 1:
- printf("9.Philadelphia: Embiid J. ");
- break;
- case 2:
- printf("9.Philadelphia: Harris T. ");
- break;
- case 3:
- printf("9.Philadelphia: Horford A. ");
- break;
- case 4:
- printf("9.Philadelphia: Richardson J. ");
- break;
- case 5:
- printf("9.Philadelphia: Simmons B. ");
- break;
- }
- if(gost_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- }
- void Houston_Indiana()
- {
- int domacin = rand() % 3 + 1;
- int gost = rand() % 3 + 1;
- int domacin_plus_minus = rand () % 2;
- int gost_plus_minus = rand () % 2;
- switch(domacin)
- {
- default:
- break;
- case 1:
- printf("10.Houston: Harden J. ");
- break;
- case 2:
- printf("10.Houston: Westbrook R. ");
- break;
- case 3:
- printf("10.Houston: Tucker PJ. ");
- break;
- }
- if(domacin_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- switch(gost)
- {
- default:
- break;
- case 1:
- printf("11.Indiana: Brogdon M. ");
- break;
- case 2:
- printf("11.Indiana: Sabonis D. ");
- break;
- case 3:
- printf("11.Indiana: Warren T.J ");
- break;
- }
- if(gost_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- }
- void GoldenState_Boston()
- {
- int domacin = rand() % 4 + 1;
- int gost = rand() % 4 + 1;
- int domacin_plus_minus = rand () % 2;
- int gost_plus_minus = rand () % 2;
- switch(domacin)
- {
- default:
- break;
- case 1:
- printf("12.Golden State: Russel D. ");
- break;
- case 2:
- printf("12.Golden State: Paschall E. ");
- break;
- case 3:
- printf("12.Golden State: Green Draymond ");
- break;
- case 4:
- printf("12.Golden State: Robinson G. ");
- break;
- }
- if(domacin_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- switch(gost)
- {
- default:
- break;
- case 1:
- printf("13.Boston: Walker K. ");
- break;
- case 2:
- printf("13.Boston: Brown J. ");
- break;
- case 3:
- printf("13.Boston: Tatum J. ");
- break;
- case 4:
- printf("13.Boston: Smart M. ");
- break;
- }
- if(gost_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- }
- void LALakers_Sacramento()
- {
- int domacin = rand() % 4 + 1;
- int gost = rand() % 4 + 1;
- int domacin_plus_minus = rand () % 2;
- int gost_plus_minus = rand () % 2;
- switch(gost)
- {
- default:
- break;
- case 1:
- printf("14.Sacramento: Hield B. ");
- break;
- case 2:
- printf("14.Sacramento: Barnes H. ");
- break;
- case 3:
- printf("14.Sacramento: Bogdanovic Bogdan ");
- break;
- case 4:
- printf("14.Sacramento: Bjelica N. ");
- break;
- }
- if(gost_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- switch(domacin)
- {
- default:
- break;
- case 1:
- printf("15.LA Lakers: Davis A. ");
- break;
- case 2:
- printf("15.LA Lakers: James L. ");
- break;
- case 3:
- printf("15.LA Lakers: Bradley A. ");
- break;
- case 4:
- printf("15.LA Lakers: Green Dany. ");
- break;
- }
- if(domacin_plus_minus)
- {
- printf("+\n");
- }
- else
- {
- printf("-\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement