Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Conversation opened. 1 read message.
- Skip to content
- Using Gmail with screen readers
- Click here to enable desktop notifications for Gmail. Learn more Hide
- Move to Inbox
- More
- 1 of 3
- Testas
- tomas tomas <tomasgasiunas159@gmail.com>
- AttachmentsNov 30
- to crugthew
- Tomo Gasiuno Testas
- Attachments area
- Click here to Reply or Forward
- 0.03 GB (0%) of 15 GB used
- Manage
- Terms - Privacy
- Last account activity: 5 days ago
- Details
- #include <iostream>
- #include <fstream>
- #include <stdlib.h>
- #include <time.h>
- using namespace std;
- // 1 uzduotis
- void fillArray(){
- int mas[X][Y]
- cout << "Iveskite masyvus :" << endl;
- cin >> n >> m;
- cout << endl;
- for (i = 1; i <= n; i++)
- for (j = 1; j <= m; j++){
- cout << "Iveskite X ir Y : ";
- cin >> mas[X][Y]
- }
- }
- //2uzduotis
- // void sortArray(){
- // for (int i = 0; i < size - 1; i++) {
- // for (int j = i + 1; j < size; j++) {
- // if (mas[i].tvarka < mas[j].tvarka) {
- // ZMOGUS mas = mas[i];
- // mas[i] = mas[j];
- // mas[j] = mas;
- // }
- // }
- // }
- // };
- //3 Uzduotis
- // struct PERSON{
- // int ugis = 0;
- // int svoris = 0;
- // int amzius = 0;
- // string vardas = "";
- // string pavarde = "";
- // void Isklotine();
- // };
- // void PERSON::Isklotine() {
- // cout << vardas << " " << pavarde << " yra " << amzius << " amziaus, sveria " << svoris << " ir yra " << ugis << " Centimetru ugio.\n";
- // }
- // void Informacija() {
- // cout << "0: iseiti" << "\n";
- // cout << "1: naujas Zmogus" << "\n";
- // cout << "2: Parodyti" << "\n";
- // };
- // int Komanda(){
- // int gautiKomanda = 0;
- // cout << "Kokia Komanda? ";
- // cin >> gautiKomanda;
- // return gautiKomanda;
- // }
- // void NaujasZmogus(PERSON (&zmones)[100], int & sukurtaZmoniu){
- // PERSON naujasZmogus;
- // cout << "Koks vardas?"; cin >> naujasZmogus.vardas;
- // cout << "Kokia pavarde?"; cin >> naujasZmogus.pavarde;
- // cout << "Koks ugis?"; cin >> naujasZmogus.ugis;
- // cout << "kiek metu?"; cin >> naujasZmogus.amzius;
- // cout << "Kiek sveria?"; cin >> naujasZmogus.svoris;
- // zmones[sukurtaZmoniu] = naujasZmogus;
- // sukurtaZmoniu ++;
- // }
- // void ZmogausIsklotine(PERSON zmones[100], int& sukurtaZmoniu){
- // for(int i = 0; i < sukurtaZmoniu; i++){
- // zmones[i].Isklotine();
- // }
- // }
- // int main(){
- // const int size = 100;
- // PERSON zmones[size];
- // Informacija();
- // int sukurtaZmoniu = 0;
- // int gautiKomanda = Komanda();
- // while (gautiKomanda != 0) {
- // if (gautiKomanda == 1) NaujasZmogus(zmones, sukurtaZmoniu);
- // else if (gautiKomanda == 2) ZmogausIsklotine(zmones, sukurtaZmoniu);
- // gautiKomanda = Komanda();
- // };
- // }
- testas.cpp
- Displaying testas.cpp.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement