Guest User

Untitled

a guest
Oct 16th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.29 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3. #include <fstream>
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <string>
  7.  
  8. using namespace std;
  9.  
  10. int kolejka;
  11. string teamA [8];
  12. string teamB [8];
  13. string wynikA [8];
  14. string wynikB [8];
  15. int para;
  16. char wybor;
  17. bool koniec;
  18.  
  19. int main() {
  20.  
  21. system("chcp 1250>nul");
  22.  
  23. cout<<"OPOLSKA 4. LIGA"<<endl<<"Podaj numer kolejki: ";
  24. cin>>kolejka;
  25.  
  26. system("cls");
  27. getchar();
  28.  
  29.  
  30. for(para=1;para<=8;para++){
  31. cout<<"WYNIKI "<<kolejka<<". KOLEJKI OPOLSKIEJ 4. LIGI:"<<endl<<endl<<endl;
  32. cout<<"1. "<<teamA[0]<<"\t"<<teamB[0]<<endl; cout<<"2. "<<teamA[1]<<"\t"<<teamB[1]<<endl;
  33. cout<<"3. "<<teamA[2]<<"\t"<<teamB[2]<<endl; cout<<"4. "<<teamA[3]<<"\t"<<teamB[3]<<endl;
  34. cout<<"5. "<<teamA[4]<<"\t"<<teamB[4]<<endl; cout<<"6. "<<teamA[5]<<"\t"<<teamB[5]<<endl;
  35. cout<<"7. "<<teamA[6]<<"\t"<<teamB[6]<<endl; cout<<"8. "<<teamA[7]<<"\t"<<teamB[7]<<endl;
  36. cout<<"Podaj nazwe drużyny gospodarzy z "<<para<<" . pary: ";getline(cin,teamA[para-1]);system("cls");
  37.  
  38. cout<<"WYNIKI "<<kolejka<<". KOLEJKI OPOLSKIEJ 4. LIGI:"<<endl<<endl<<endl;
  39. cout<<"1. "<<teamA[0]<<"\t"<<teamB[0]<<endl; cout<<"2. "<<teamA[1]<<"\t"<<teamB[1]<<endl;
  40. cout<<"3. "<<teamA[2]<<"\t"<<teamB[2]<<endl; cout<<"4. "<<teamA[3]<<"\t"<<teamB[3]<<endl;
  41. cout<<"5. "<<teamA[4]<<"\t"<<teamB[4]<<endl; cout<<"6. "<<teamA[5]<<"\t"<<teamB[5]<<endl;
  42. cout<<"7. "<<teamA[6]<<"\t"<<teamB[6]<<endl; cout<<"8. "<<teamA[7]<<"\t"<<teamB[7]<<endl;
  43. cout<<"Podaj nazwe drużyny gości z "<<para<<" . pary: ";getline(cin,teamB[para-1]);system("cls");
  44. }
  45.  
  46. for(para=1;para<=8;para++){
  47. cout<<"WYNIKI "<<kolejka<<". KOLEJKI OPOLSKIEJ 4. LIGI:"<<endl<<endl<<endl;
  48. cout<<"1. "<<teamA[0]<<"\t"<<wynikA[0]<<"\t"<<wynikB[0]<<"\t"<<teamB[0]<<endl; cout<<"2. "<<teamA[1]<<"\t"<<wynikA[1]<<"\t"<<wynikB[1]<<"\t"<<teamB[1]<<endl;
  49. cout<<"3. "<<teamA[2]<<"\t"<<wynikA[2]<<"\t"<<wynikB[2]<<"\t"<<teamB[2]<<endl; cout<<"4. "<<teamA[3]<<"\t"<<wynikA[3]<<"\t"<<wynikB[3]<<"\t"<<teamB[3]<<endl;
  50. cout<<"5. "<<teamA[4]<<"\t"<<wynikA[4]<<"\t"<<wynikB[4]<<"\t"<<teamB[4]<<endl; cout<<"6. "<<teamA[5]<<"\t"<<wynikA[5]<<"\t"<<wynikB[5]<<"\t"<<teamB[5]<<endl;
  51. cout<<"7. "<<teamA[6]<<"\t"<<wynikA[6]<<"\t"<<wynikB[6]<<"\t"<<teamB[6]<<endl; cout<<"8. "<<teamA[7]<<"\t"<<wynikA[7]<<"\t"<<wynikB[7]<<"\t"<<teamB[7]<<endl;
  52. cout<<"Podaj wynik drużyny gospodarzy z "<<para<<" .pary: ";getline(cin,wynikA[para-1]);system("cls");
  53.  
  54. cout<<"WYNIKI "<<kolejka<<". KOLEJKI OPOLSKIEJ 4. LIGI:"<<endl<<endl<<endl;
  55. cout<<"1. "<<teamA[0]<<"\t"<<wynikA[0]<<"\t"<<wynikB[0]<<"\t"<<teamB[0]<<endl; cout<<"2. "<<teamA[1]<<"\t"<<wynikA[1]<<"\t"<<wynikB[1]<<"\t"<<teamB[1]<<endl;
  56. cout<<"3. "<<teamA[2]<<"\t"<<wynikA[2]<<"\t"<<wynikB[2]<<"\t"<<teamB[2]<<endl; cout<<"4. "<<teamA[3]<<"\t"<<wynikA[3]<<"\t"<<wynikB[3]<<"\t"<<teamB[3]<<endl;
  57. cout<<"5. "<<teamA[4]<<"\t"<<wynikA[4]<<"\t"<<wynikB[4]<<"\t"<<teamB[4]<<endl; cout<<"6. "<<teamA[5]<<"\t"<<wynikA[5]<<"\t"<<wynikB[5]<<"\t"<<teamB[5]<<endl;
  58. cout<<"7. "<<teamA[6]<<"\t"<<wynikA[6]<<"\t"<<wynikB[6]<<"\t"<<teamB[6]<<endl; cout<<"8. "<<teamA[7]<<"\t"<<wynikA[7]<<"\t"<<wynikB[7]<<"\t"<<teamB[7]<<endl;
  59. cout<<"Podaj wynik drużyny gości z "<<para<<" .pary: ";getline(cin,wynikB[para-1]);system("cls");
  60. }
  61. cout<<"\a";
  62. do{
  63. system("cls");wybor=9001;
  64. cout<<"WYNIKI "<<kolejka<<". KOLEJKI OPOLSKIEJ 4. LIGI:"<<endl<<endl<<endl;
  65. cout<<"1. "<<teamA[0]<<"\t"<<wynikA[0]<<"\t"<<wynikB[0]<<"\t"<<teamB[0]<<endl; cout<<"2. "<<teamA[1]<<"\t"<<wynikA[1]<<"\t"<<wynikB[1]<<"\t"<<teamB[1]<<endl;
  66. cout<<"3. "<<teamA[2]<<"\t"<<wynikA[2]<<"\t"<<wynikB[2]<<"\t"<<teamB[2]<<endl; cout<<"4. "<<teamA[3]<<"\t"<<wynikA[3]<<"\t"<<wynikB[3]<<"\t"<<teamB[3]<<endl;
  67. cout<<"5. "<<teamA[4]<<"\t"<<wynikA[4]<<"\t"<<wynikB[4]<<"\t"<<teamB[4]<<endl; cout<<"6. "<<teamA[5]<<"\t"<<wynikA[5]<<"\t"<<wynikB[5]<<"\t"<<teamB[5]<<endl;
  68. cout<<"7. "<<teamA[6]<<"\t"<<wynikA[6]<<"\t"<<wynikB[6]<<"\t"<<teamB[6]<<endl; cout<<"8. "<<teamA[7]<<"\t"<<wynikA[7]<<"\t"<<wynikB[7]<<"\t"<<teamB[7]<<endl;
  69.  
  70. cout<<endl<<"Czy chcesz poprawić wprowadzone dane? (y/n) ";
  71. cin>>wybor;
  72.  
  73. if(wybor=='n') {koniec=1;}
  74. else if(wybor=='y') {system("cls");wybor=9001;
  75.  
  76. cout<<"WYNIKI "<<kolejka<<". KOLEJKI OPOLSKIEJ 4. LIGI:"<<endl<<endl<<endl;
  77. cout<<"1. "<<teamA[0]<<"\t"<<wynikA[0]<<"\t"<<wynikB[0]<<"\t"<<teamB[0]<<endl; cout<<"2. "<<teamA[1]<<"\t"<<wynikA[1]<<"\t"<<wynikB[1]<<"\t"<<teamB[1]<<endl;
  78. cout<<"3. "<<teamA[2]<<"\t"<<wynikA[2]<<"\t"<<wynikB[2]<<"\t"<<teamB[2]<<endl; cout<<"4. "<<teamA[3]<<"\t"<<wynikA[3]<<"\t"<<wynikB[3]<<"\t"<<teamB[3]<<endl;
  79. cout<<"5. "<<teamA[4]<<"\t"<<wynikA[4]<<"\t"<<wynikB[4]<<"\t"<<teamB[4]<<endl; cout<<"6. "<<teamA[5]<<"\t"<<wynikA[5]<<"\t"<<wynikB[5]<<"\t"<<teamB[5]<<endl;
  80. cout<<"7. "<<teamA[6]<<"\t"<<wynikA[6]<<"\t"<<wynikB[6]<<"\t"<<teamB[6]<<endl; cout<<"8. "<<teamA[7]<<"\t"<<wynikA[7]<<"\t"<<wynikB[7]<<"\t"<<teamB[7]<<endl;
  81. cout<<"Podaj numer pary którą chcesz zedytować: ";cin>>para;cout<<endl;
  82.  
  83.  
  84.  
  85.  
  86. getchar();cout<<"Podaj nazwe drużyny gospodarzy z "<<para<<" . pary: ";getline(cin,teamA[para-1]);
  87. cout<<"Podaj nazwe drużyny gości z "<<para<<" . pary: ";getline(cin,teamB[para-1]);
  88. cout<<"Podaj wynik drużyny gospodarzy z "<<para<<" .pary: ";getline(cin,wynikA[para-1]);
  89. cout<<"Podaj wynik drużyny gości z "<<para<<" .pary: ";getline(cin,wynikB[para-1]);
  90. }
  91. } while (wybor!='n');
  92. if(koniec=1); cout<<"done.";
  93.  
  94.  
  95. return 0;
  96. }
Add Comment
Please, Sign In to add comment