File size: 268 Bytes
c011401
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "zoo.h"
#include <cstdio>
#include <cstring>

Zoo::Zoo()
{
  n = 0;
}

void Zoo::shut_up(char *animal)
{
  if (n < 10) {
    strcpy(animals[n], animal);
    n++;
  }
}

void Zoo::display()
{
  int i;
  for(i = 0; i < n; i++)
    printf("%s\n", animals[i]);
}