Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- const int N=3;
- using namespace std;
- struct SDane
- {
- string imie;
- int wiek;
- };
- sortowanie(SDane *tab, SDane &tabA, SDane &tabB){
- int c=0, d=0;
- for(int i=0; i<N; i++)
- {
- if(tab[i].wiek>18)
- {
- c++;
- }
- if(tab[i].imie[tab[i].imie.size()-1])
- {
- d++;
- }
- }
- c=0;
- d=0;
- for(int i=0; i<N; i++)
- if(tab[i].wiek>18)
- {
- tabA[c]=tab[i];
- c++
- }
- if(tab[i].imie[tab[i].imie.size()-1]='a')
- {
- tabB[d]=tab[i];
- d++
- }
- }
- }
- int main()
- {
- SDane tabA, tabB;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement