C#:Assessment Arrays Easy

You can use arrays to solve these problems. In each example your program must read in a file of numbers and output true or false.

For each problem there is a set of test files.

Check 1 to 20

Read in some numbers from 1 to 20.

Change the method `check` so that it will:

• print true if all of the numbers from 1 to 20 are present
• print false otherwise.

You may find the following tutorial useful:

The test files used are: http://progzoo.net/array11.txt

```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
```
```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 17 19 20
```
```1
```
```11 12 13 14 15 16 17 18 19 1 2 3 4 5 6 7 8 9 10 20
```

[Font] [Default] [Show] [Resize] [History] [Profile]

Palindromes

Read in a list of numbers. Print true if the list of numbers is "palindromic" – that is it reads the same backwards as forwards; print "false" otherwise.

You may assume that there are fewer than 100 numbers in the list.

The test files used are: http://progzoo.net/array15.txt

```1 2 2 1
```
```1 2 2 2 2 2 2
```
```1 8 1 6 7 6 1 8 1
```
```200 300 300 299 300 200
```

[Font] [Default] [Show] [Resize] [History] [Profile]

Duplicates

Read in 20 numbers, each between 1 and 100, inclusive. Print true if the list includes at least one duplicate; print false otherwise.

You will find the frequency list used in the first question useful here.

The test files used are: http://progzoo.net/array19.txt

```10
```
```99 98 1 2 99
```
```41 74 87 72 36 33 27 39 49 45 23 69 97 20 1 35 60 56 68 6 92 57 25 84 61 5 99 93 90 65 85 8 66 86 89 43 14 62 94 30 75 79 38 44 78 37 91 19 47 71 98 48 83 26 4 76 58 18 29 53 24 70 81 17 82 73 100 2 67 32 28 96 12 59 10 7 15 42 88 50 11 64 63 34 80 77 54 22 95 9 52 21 55 40 31 3 16 46 51
```
```13 41 74 77 72 36 33 27 39 49 45 23 69 97 20 1 35 60 56 68 6 92 57 25 84 61 5 99 93 90 65 85 8 66 86 89 43 14 62 94 30 75 79 38 44 78 37 91 19 47 71 98 48 83 26 4 76 58 18 29 53 24 70 81 17 82 73 100 2 67 32 28 96 12 59 10 7 15 42 88 50 11 64 63 34 80 77 54 22 95 9 52 21 55 40 31 3 16 46 51
```

[Font] [Default] [Show] [Resize] [History] [Profile]