Advertisement
Guest User

Untitled

a guest
Dec 15th, 2017
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.03 KB | None | 0 0
  1.  
  2. Conversation opened. 1 read message.
  3.  
  4. Skip to content
  5. Using Gmail with screen readers
  6. Click here to enable desktop notifications for Gmail. Learn more Hide
  7. Move to Inbox
  8.  
  9. More
  10. 1 of 3
  11.  
  12. Testas
  13. tomas tomas <tomasgasiunas159@gmail.com>
  14.  
  15. AttachmentsNov 30
  16.  
  17. to crugthew
  18. Tomo Gasiuno Testas
  19. Attachments area
  20.  
  21. Click here to Reply or Forward
  22. 0.03 GB (0%) of 15 GB used
  23. Manage
  24. Terms - Privacy
  25. Last account activity: 5 days ago
  26. Details
  27.  
  28.  
  29.  
  30. #include <iostream>
  31. #include <fstream>
  32. #include <stdlib.h>
  33. #include <time.h>
  34.  
  35. using namespace std;
  36.  
  37.  
  38.  
  39. // 1 uzduotis
  40.  
  41. void fillArray(){
  42.  
  43. int mas[X][Y]
  44. cout << "Iveskite masyvus :" << endl;
  45.  
  46. cin >> n >> m;
  47.  
  48. cout << endl;
  49.  
  50. for (i = 1; i <= n; i++)
  51.  
  52. for (j = 1; j <= m; j++){
  53.  
  54. cout << "Iveskite X ir Y : ";
  55.  
  56. cin >> mas[X][Y]
  57. }
  58. }
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72. //2uzduotis
  73.  
  74. // void sortArray(){
  75. // for (int i = 0; i < size - 1; i++) {
  76.  
  77. // for (int j = i + 1; j < size; j++) {
  78.  
  79. // if (mas[i].tvarka < mas[j].tvarka) {
  80.  
  81. // ZMOGUS mas = mas[i];
  82. // mas[i] = mas[j];
  83. // mas[j] = mas;
  84.  
  85. // }
  86.  
  87. // }
  88.  
  89. // }
  90. // };
  91.  
  92.  
  93.  
  94.  
  95. //3 Uzduotis
  96. // struct PERSON{
  97.  
  98. // int ugis = 0;
  99. // int svoris = 0;
  100. // int amzius = 0;
  101.  
  102. // string vardas = "";
  103. // string pavarde = "";
  104. // void Isklotine();
  105. // };
  106. // void PERSON::Isklotine() {
  107.  
  108. // cout << vardas << " " << pavarde << " yra " << amzius << " amziaus, sveria " << svoris << " ir yra " << ugis << " Centimetru ugio.\n";
  109. // }
  110. // void Informacija() {
  111.  
  112. // cout << "0: iseiti" << "\n";
  113. // cout << "1: naujas Zmogus" << "\n";
  114. // cout << "2: Parodyti" << "\n";
  115.  
  116. // };
  117.  
  118. // int Komanda(){
  119.  
  120. // int gautiKomanda = 0;
  121. // cout << "Kokia Komanda? ";
  122. // cin >> gautiKomanda;
  123. // return gautiKomanda;
  124. // }
  125.  
  126. // void NaujasZmogus(PERSON (&zmones)[100], int & sukurtaZmoniu){
  127.  
  128. // PERSON naujasZmogus;
  129.  
  130.  
  131. // cout << "Koks vardas?"; cin >> naujasZmogus.vardas;
  132. // cout << "Kokia pavarde?"; cin >> naujasZmogus.pavarde;
  133. // cout << "Koks ugis?"; cin >> naujasZmogus.ugis;
  134. // cout << "kiek metu?"; cin >> naujasZmogus.amzius;
  135. // cout << "Kiek sveria?"; cin >> naujasZmogus.svoris;
  136. // zmones[sukurtaZmoniu] = naujasZmogus;
  137. // sukurtaZmoniu ++;
  138. // }
  139. // void ZmogausIsklotine(PERSON zmones[100], int& sukurtaZmoniu){
  140.  
  141. // for(int i = 0; i < sukurtaZmoniu; i++){
  142.  
  143. // zmones[i].Isklotine();
  144. // }
  145. // }
  146. // int main(){
  147.  
  148. // const int size = 100;
  149. // PERSON zmones[size];
  150.  
  151. // Informacija();
  152. // int sukurtaZmoniu = 0;
  153. // int gautiKomanda = Komanda();
  154.  
  155. // while (gautiKomanda != 0) {
  156.  
  157. // if (gautiKomanda == 1) NaujasZmogus(zmones, sukurtaZmoniu);
  158. // else if (gautiKomanda == 2) ZmogausIsklotine(zmones, sukurtaZmoniu);
  159. // gautiKomanda = Komanda();
  160. // };
  161. // }
  162.  
  163. testas.cpp
  164. Displaying testas.cpp.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement