I have the code below that can produce
[p18d541#csci112 program1]$ ./main 17 < inp17.txt
12 25 110 168
35 64 113 134
91 158 183 217
102 129 130 146
26 116 215 223
0 78 81 162
19 25 204 222
124 138 157 245
137 183 201 249
61 67 106 236
60 71 106 236
63 81 106 240
14 27 111 168
17 27 111 168
26 116 215 220
111 137 202 249
111 137 202 246
from an input of
168.12.110.25
64.113.134.35
217.158.91.183
102.130.129.146
215.116.26.223
81.162.78.0
19.204.25.222
245.124.138.157
137.249.183.201
106.61.236.67
106.71.236.60
106.81.240.63
168.14.111.27
168.17.111.27
215.116.26.220
137.249.111.202
137.246.111.202
so my code scans in the input stores the values in network
and then I need to arrange them by the column from least to greatest starting at the first number and working its way to the right. an example of a the first few would be
0 78 81 162
12 25 110 168
14 27 111 168
.
.
.
111 137 202 246
111 137 202 249
.
.
.
.
//declare libraries
#include <stdio.h>
#include <stdlib.h>
//declare other functions/files to be used in the program
void print_fun(void);
int sort_fun(int arg, unsigned char networks[arg][4]);
void read_fun(void);
//read command line input and store the information
int main(int argc, char** argv){
//declar variable
int arg = 0;
//make argv into an int
arg = atoi(argv[1]);
//assign size to networks
unsigned char networks[arg][4];
//assign input to networks
for (int j =0; j<1; ++j){
if(argc == 1)
{
printf("ERROR ERROR, you messed up\n");
}
else
{
// hold network addresses in a 2-d array, with 4 nsigned char
for(int k = 0; k<arg; k++){
for (int i =0; i<4; i++){
scanf("%hhu.", &networks[k][i]);
//checks to see if scanf was working roperly
// printf(" %hhu",networks[k][i]);
}
//printf("\n");
}}}
sort_fun(arg, networks);
//sort array
//count networks
//print info about the array
return(0);
}
int sort_fun(int arg, unsigned char networks[arg][4]){
//declaring variabes
//sorting by comlumn p
for (int k = 0; k < arg; k++){
for( int i = 0; i < 4; i++){
for (int j = i+1; j<4; ++j){
if (networks[k][i] > networks[k][j]) {
int swap = networks[k][i];
networks[k][i] = networks[k][j];
networks[k][j] = swap;
}
}
}
}
for (int i =0; i<arg; i++){
for (int j =0; j < 4; j++){
printf(" %hhu", networks[i][j]);
}
printf("\n");
}
return(0);
}
I have tried switching around the variables in my for loop and messing with the values, but I cannot seem to figure out how to change my code to work in columns instead of rows.
and by the way each value is stored in a separate array element but they need to stick together like in the input, so when one number moves the whole line moves with it. please let me know what you think. thank you.
Related
I have the code below that can produce
[p18d541#csci112 program1]$ ./main 17 < inp17.txt
12 25 110 168
35 64 113 134
91 158 183 217
102 129 130 146
26 116 215 223
0 78 81 162
19 25 204 222
124 138 157 245
137 183 201 249
61 67 106 236
60 71 106 236
63 81 106 240
14 27 111 168
17 27 111 168
26 116 215 220
111 137 202 249
111 137 202 246
from an input of
168.12.110.25
64.113.134.35
217.158.91.183
102.130.129.146
215.116.26.223
81.162.78.0
19.204.25.222
245.124.138.157
137.249.183.201
106.61.236.67
106.71.236.60
106.81.240.63
168.14.111.27
168.17.111.27
215.116.26.220
137.249.111.202
137.246.111.202
so my code scans in the input stores the values in network
and then I need to arrange them by the column from least to greatest starting at the first number and working its way to the right. an example of a the first few would be
0 78 81 162
12 25 110 168
14 27 111 168
.
.
.
111 137 202 246
111 137 202 249
.
.
.
.
//declare libraries
#include <stdio.h>
#include <stdlib.h>
//declare other functions/files to be used in the program
void print_fun(void);
int sort_fun(int arg, unsigned char networks[arg][4]);
void read_fun(void);
//read command line input and store the information
int main(int argc, char** argv){
//declar variable
int arg = 0;
//make argv into an int
arg = atoi(argv[1]);
//assign size to networks
unsigned char networks[arg][4];
//assign input to networks
for (int j =0; j<1; ++j){
if(argc == 1)
{
printf("ERROR ERROR, you messed up\n");
}
else
{
// hold network addresses in a 2-d array, with 4 nsigned char
for(int k = 0; k<arg; k++){
for (int i =0; i<4; i++){
scanf("%hhu.", &networks[k][i]);
//checks to see if scanf was working roperly
// printf(" %hhu",networks[k][i]);
}
//printf("\n");
}}}
sort_fun(arg, networks);
//sort array
//count networks
//print info about the array
return(0);
}
int sort_fun(int arg, unsigned char networks[arg][4]){
//declaring variabes
//sorting by comlumn p
for (int k = 0; k < arg; k++){
for( int i = 0; i < 4; i++){
for (int j = i+1; j<4; ++j){
if (networks[k][i] > networks[k][j]) {
int swap = networks[k][i];
networks[k][i] = networks[k][j];
networks[k][j] = swap;
}
}
}
}
for (int i =0; i<arg; i++){
for (int j =0; j < 4; j++){
printf(" %hhu", networks[i][j]);
}
printf("\n");
}
return(0);
}
I have tried switching around the variables in my for loop and messing with the values, but I cannot seem to figure out how to change my code to work in columns instead of rows.
and by the way each value is stored in a separate array element but they need to stick together like in the input, so when one number moves the whole line moves with it. please let me know what you think. thank you.
I am currently learning C and trying to solve a problem. I need to find all the prime numbers from 2 to 100, using arrays and loops.
I already know of a solution to this problem however I am having trouble finding the error in my code. This is my first time using StackOverflow so hopefully I commented everything properly :)
#include <stdio.h>
#include <stdlib.h>
int main(){
int prime_numbers[50] = {2,3}; //initializes the array which will be printed at the end
int counter = 1; //initializes the index of the last prime element in array
int checker = 0; //initializes a checker used to determine if the number is prime
for(int i = 5; i <= 100; i++) { //goes through numbers 5 to 100 as the first two primes are hard coded
for(int j = 0; j <= counter; j++){ //goes through array untill it reaches last prime using the before initialized counter
if(i % prime_numbers[j] != 0) { //check to see if a number that is being checked is not divisible by j'th element in array
checker++; //if so, checker is incremented
}
if(checker == counter + 1) { //check to see if number was not divisible by any prime in our array
checker = 0; //if so checker is reset to 0 for the next iteration
++counter; //counter is incremented as there is one more prime in our array
prime_numbers[counter] = i; //add inside array the found prime number
break; //break should not be necessary, however for some reason, it yields a different result when I don't put it in
} //most likely the error in the code. Need to find out why loop does not stop after second if is done
}
}
for(int g = 0; g <= 50; g++) { //prints out all the prime numbers in array
if(prime_numbers[g] != 0) {
printf("%d ", prime_numbers[g]);
}
}
return 0;
}
I expect the program to print all the prime numbers from 0 to 100 with spaces in between.
The program also finds numbers that are not prime. Its logic is a rather strange inversion. The candidate needs to be divisible by only one prime in the array. The reporting also breaks the array bounds.
The corrected code:
#include <stdio.h>
int main(void) { // correct function signature
int prime_numbers[50] = {2,3};
int counter = 1;
int checker; // initialise within each loop
for(int i = 5; i <= 100; i++){
checker = 0; // inintialise here
for(int j = 0; j <= counter; j++) {
if(i % prime_numbers[j] == 0) { // opposite test to yours
checker++; // flag a non-prime
break;
}
}
if(checker == 0) { // moved outside the loop
++counter;
prime_numbers[counter] = i;
}
}
for(int g = 0; g < 50; g++) { // corrected the bounds error
if(prime_numbers[g] != 0){
printf("%d ", prime_numbers[g]);
}
}
printf("\n"); // flush the output buffer
return 0;
}
Program output:
2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97
The reporting loop relies on the array being initialised to 0s and a better way would be
for(int j = 0; j <= counter; j++) {
printf("%d ", prime_numbers[j]);
}
printf("\n");
The following code works well.
int main()
{
int k=1,temp,j;
const int N_prime = 10000; // number of primes to be generated
int primes[N_prime]; // array to save primes
primes[0] = 2;
primes[1] = 3;
temp = 5;
while (k!=N_prime-1){ // generating only N_prime prime numbers
for (j = 0; j <= k && primes[j] * primes[j] <= temp; j++){
if (temp%primes[j] == 0){ // if temp%primes[j] == 0 then temp is divisible by
temp += 2; // a prime and is not a prime itself, therefore
break; // immediately break
}
else if (primes[j+1] * primes[j+1]>temp){ // if no such primes found, temp is prime,
primes[k + 1] = temp; // save it and increase the value for
k++; // next check
temp += 2;
}
}
}
for (int ind = 0; ind < N_prime; ind++) printf("%d\n",primes[ind]);
getch();
return 0;
}
with the output:
2
3
5
7
11
13
17
19
23
29
31
37
41
43
47
53
59
61
67
71
73
79
83
89
97
101
103
107
109
113
127
131
137
139
149
151
157
163
167
173
179
181
191
193
197
199
211
223
227
229
233
239
241
251
257
263
269
271
277
281
283
293
307
311
313
317
331
337
347
349
353
359
367
373
379
383
389
397
401
409
419
421
431
433
439
443
449
457
461
463
467
479
487
491
499
503
509
521
523
541
As I noticed, your code generates all the odd numbers up to 100.
How to write a program that calculates the multiples of 7 between 21 and 210 inclusive?
This is an incorrect example:
finding multiples of 7
#include<stdio.h>
int main(){
int multiple;
int sum;
int i=0;
int j=0;
int sum1,sum2;
for (i=1;i>=21;i++){
printf(i);
sum1=i+sum1;
for(j=1;j<=210;j++){
printf(j);
sum2=j+sum2;
}
}
sum=sum1+sum2;
printf("sum",sum);
}
Define lower and upper limit as n1 and n2 with 21 and 210 respectively.
#include <iostream>
#include <stdio.h>
int main()
{
int n1,n2;
n1=21;
n2=210;
while(n1<=n2)
{
if(n1%7==0)
printf("%d ",n1);
n1=n1+1;
}
}
Tested code on Code Chef - https://www.codechef.com/ide
Output:
21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126 133 140 147 154 161 168 175 182 189 196 203 210
Try this:
#include<stdio.h>
int main(void)
{
int i, j, sum = 0;
//set your lower bound and upper bound
for (i = 21 ; i <= 210 ; i++)
{
if ( (i % 7) == 0 )
{
sum += i;
}
}
printf("total sum = %d \n",sum);
}
This code is meant to read the value from an image file into an array (I know the size is 16*8).
When I dynamically create the img array so I can have any size image it crashes when run, when I manually make it the correct size (char img[16][8];) it works.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main()
{
FILE *fin;
fin= fopen ("test.pgm","rb");
if (fin == NULL)
{
printf ("ERROR");
fclose(fin);
}
int i=0,j=0,u=16,v=8,d;
char test[20];
char k;
char c[10];
while((k=fgetc(fin))!='\n')
{
test[j]=k;
j=j+1;
}
char **img = (char**) calloc(u,sizeof(char*));
for ( i = 0; i < u; i++ )
{
img[i] = (char*) calloc(v,sizeof(char));
}
fread(img,1,(u*v),fin);
for (i=0; i<u; i++)
{
for (j=0; j<v; j++)
{
printf("%d ",img[i][j]);
}
printf("\n");
}
fclose(fin);
}
Since you are dynamically allocating 16 separate 8 byte arrays, you will then need to compute 16 individual reads into each of those arrays. (I have removed the unnecessary, and potentially bug prone, casts to calloc()).
char **img = calloc(u,sizeof(char*));
for ( i = 0; i < u; i++ )
{
img[i] = calloc(v,sizeof(char));
fread(img[i],1,v,fin);
}
/*fread(img,1,(u*v),fin);*/
The single fread() call you had works for char img[16][8], because in that case, img consists of contiguous memory sized at 16 * 8 bytes. But, that call will not work for the way you have created your dynamically allocated array, since img is now an array of pointers, and so the fread() call you have will overwrite those pointer values with data from the file.
If you want to do a single call to fread(), then you can change your dynamic allocation (and combine with VLA)
char (*img)[v];
img = malloc(u * sizeof(*img));
fread(img,1,(u*v),fin);
This declares img to be a pointer to an array v of char (v was initialized to 8). It then allocates u (ie, 16) many of array v of char in a contiguous allocation for img. Now, img can be used for the single fread() call like you had for char img[16][8], and also preserves the same "2D" addressing of img as well.
The answer by jxh correctly diagnoses the trouble with the original code, which this answer does not (in part because of that). It also demonstrates the power of variable length arrays, VLAs, which were added to C99. It is really neat and should be accepted.
If you are stuck with C89 (perhaps because you work on Windows with MSVC), then you can still do the single read if you allocate the space contiguously. However, if you're also going to use the double index notation, you still need the array of pointers, or you will need to use the notation img[i*v+j] (and a different type for img). This code implements the extra array of pointers, and also includes a variety of other minor bug fixes to the original code (the most important being that it returns after failing to open the file, rather than reporting 'ERROR' and continuing as if nothing had gone wrong, including attempting to fclose() a null pointer, which is good for a crash).
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
const char *filename = "test.pgm";
FILE *fin = fopen(filename, "rb");
if (fin == NULL)
{
fprintf(stderr, "ERROR opening file %s\n", filename);
return(1);
}
int i;
int j = 0;
int u=16;
int v=8;
char test[20];
int k;
while ((k = fgetc(fin)) != '\n')
test[j++] = k;
test[j] = '\0';
printf("test: %s\n", test);
char **img = (char**) calloc(u,sizeof(char*));
char *space = (char *)calloc(u*v, sizeof(char));
for (i = 0; i < u; i++)
img[i] = &space[v*i];
if (fread(img[0], 1, (u*v), fin) != (size_t)(u*v))
{
fprintf(stderr, "Error: short read\n");
return(1);
}
for (i = 0; i < u; i++)
{
for (j = 0; j < v; j++)
printf("%3d ", img[i][j]);
printf("\n");
}
fclose(fin);
free(img[0]);
free(img);
return(0);
}
Note that the loop reading into test is not properly error checked; it could overflow, and it doesn't detect EOF, either.
Input data:
abcdefghij
aaaaaaa
bbbbbbb
ccccccc
ddddddd
eeeeeee
fffffff
ggggggg
hhhhhhh
iiiiiii
jjjjjjj
kkkkkkk
lllllll
mmmmmmm
nnnnnnn
ooooooo
ppppppp
Output data:
test: abcdefghij
97 97 97 97 97 97 97 10
98 98 98 98 98 98 98 10
99 99 99 99 99 99 99 10
100 100 100 100 100 100 100 10
101 101 101 101 101 101 101 10
102 102 102 102 102 102 102 10
103 103 103 103 103 103 103 10
104 104 104 104 104 104 104 10
105 105 105 105 105 105 105 10
106 106 106 106 106 106 106 10
107 107 107 107 107 107 107 10
108 108 108 108 108 108 108 10
109 109 109 109 109 109 109 10
110 110 110 110 110 110 110 10
111 111 111 111 111 111 111 10
112 112 112 112 112 112 112 10
You fread into your array of pointers but they point to various places in memory so that will not work.
In order for it to work set pointers to point to the same block but at different offsets
so instead of
char **img = calloc(u,sizeof(char*));
for ( i = 0; i < u; i++ )
{
img[i] = calloc(v,sizeof(char));
}
do
char **img = calloc(u,sizeof(char*));
char *block = calloc(u*v,sizeof(char);
for ( i = 0; i < u; i++ )
{
img[i] = block + v*i;
}
then
fread(block,1,(u*v),fin);
I would like to create a dynamic array which store permutation sequence, such that
order[0][]={1,2,3}
order[1][]={2,1,3}
order[2][]={2,3,1}
let say order[m][n], m = number of permutation, n = number of term, m and n are identified in real-time.
I did the below, and found that the pointer address is overlapping, resulting in incorrect value storage. How can do it correctly using dynamic array via double pointer?
void permute(int num_permute, int num_term, int** order) {
int x, y;
int term[5];
/* debug only */
for(y=num_term, x=0; y>0; y--, x++){
term[x] = y;
}
fprintf(stderr, "\n");
printf("order%12c", ' ');
for (x=0; x<num_permute; ++x) {
printf(" %-11d", x);
}
printf("\n");
for(y=0; y<num_permute; y++){
printf("%-5d%12p", y, (order+y));
memcpy(&(order[y]), term, sizeof(term));
for (x=0; x<num_term; x++)
printf(" %12p", order+y+x);
printf("\n");
}
}
int main(){
int y, z;
int** x;
x = (int*) malloc(5*5*sizeof(int*));
permute(5, 5, x);
printf("\n");
printf("x ");
for(z=0; z<5; z++){
printf(" %2d ", z);
}
printf("\n");
for(y=0; y<5; y++){
printf("%-4d", y);
for(z=0; z<5; z++){
printf(" %2d ", *(x+y+z));
}
printf("\n");
}
free(x);
return 0;
}
Result: order[0][1] and order[1][0] point to same address... and so do others. With rows as the major axis and columns the minor:
order 0 1 2 3 4
0 0x100100080 0x100100080 0x100100084 0x100100088 0x10010008c 0x100100090
1 0x100100084 0x100100084 0x100100088 0x10010008c 0x100100090 0x100100094
2 0x100100088 0x100100088 0x10010008c 0x100100090 0x100100094 0x100100098
3 0x10010008c 0x10010008c 0x100100090 0x100100094 0x100100098 0x10010009c
4 0x100100090 0x100100090 0x100100094 0x100100098 0x10010009c 0x1001000a0
x 0 1 2 3 4
0 5 5 5 5 5
1 5 5 5 5 4
2 5 5 5 4 3
3 5 5 4 3 2
4 5 4 3 2 1
Source Code:
The code will be something like:
#include <stdlib.h>
int **array;
array = malloc(nrows * sizeof(int *));
if(array == NULL)
{
fprintf(stderr, "out of memory\n");
/*exit or return*/
}
for(i = 0; i < nrows; i++)
{
array[i] = malloc(ncolumns * sizeof(int));
if(array[i] == NULL)
{
fprintf(stderr, "out of memory\n");
/*exit or return*/
}
}
Concept:
array is a pointer-to-pointer-to-int: at the first level, it points to a block of pointers, one for each row. That first-level pointer is the first one to be allocated; it has nrows elements, with each element big enough to hold a pointer-to-int, or int *. If the allocation is successful then fill in the pointers (all nrows of them) with a pointer (also obtained from malloc) to ncolumns number of ints, the storage for that row of the array.
Pictorial Depiction:
It is simple to grasp if you visualize the situation as:
Taking this into account, the sample code could be rewritten as:
void permute(int num_permute, int num_term, int** order) {
int x, y;
int term[5];
int* ptr = NULL;
for (y=num_term, x=0; y>0; y--, x++) {
term[x] = y;
}
printf("\n");
printf("order%12c", ' ');
for (x=0; x<num_permute; ++x) {
printf(" %2d ", x);
}
printf("\n");
for (y=0; y<num_permute; y++) {
ptr = order[y];
memcpy(ptr, term, sizeof(term));
printf("%-5d%12p", y, ptr);
for (x=0; x<num_term; x++) {
printf(" %2d ", ptr[x]);
}
printf("\n");
}
}
int main() {
int y, z;
int** x = NULL;
int num_term = 5;
int num_permutation = 5;
int* pchk = NULL;
x = (int**) malloc(num_permutation * sizeof(int*));
for (y=0; y<num_permutation; y++){
x[y] = (int*) malloc(num_term * sizeof(int));
printf("x[%d]: %p\n", y, x[y]);
}
permute(num_permutation, num_term, x);
printf("\nx: ");
for(z=0; z<5; z++){
printf(" %2d ", z);
}
printf("\n");
for(y=0; y<num_permutation; y++){
pchk = x[y];
printf("%-4d", y);
for(z=0; z<num_term; z++){
printf(" %2d ", pchk[z]);
}
printf("\n");
}
for (y=0; y<num_permutation; y++) {
free(x[y]);
}
free(x);
return 0;
}
The code sample only simulates a multidimensional array, and does it incorrectly. To see what's going wrong, start by considering what happens when you declare a multidimensional array:
int foo[3][5];
This allocates a contiguous region of memory of size 3*5*sizeof(int). In an expression such as foo[i], the foo is converted to a int [5] pointer, then the index operator is applied. In other words, foo[i] is equivalent to *( (int (*)[5])foo) + i). Each foo[i] would be considered as having size 5*sizeof(int).
x,y: 0,0 0,1 0,2 0,3 0,4 1,0
foo --> | 1 | 2 | 3 | 4 | 5 | 1 |...
<- 5 * sizeof(int) ->
When you create x in the sample code, you're replicating this type of multidimensional array. The index expression you're using (*(order + y + x)) is thus wrong, as it doesn't properly handle the size of order[y]: order + 1 + 0 == order + 0 + 1, which is the problem you're seeing in the sample output.
The correct expressions are: (order + num_term * y) for the yth permutation and *(order + num_term * y + x) for element order[y][x].
This suggests another class of error in the sample. For this kind of simulated multidimensional array, the array types are actually pointers to single dimensional arrays. The declared types of x and order should be int*, not int**. This should be reinforced by the type warnings the sample code should generate:
when allocating space for x, the type of the pointer (int*) doesn't match the type of x
when printing the elements of x, the type of *(x+y+z) doesn't match the format "%d".
However, while simulating a multidimensional array saves space, it's more error prone when used (unless you write a function to handle indexing). A solution such as Als' may be safer, as you can use the standard indexing operator.
Emulating a 2D array with pointer arrays is a complete overkill if you have C99 (or C11). Just use
void permute(size_t num_permute, size_t num_term, unsigned order[][num_term]);
as your function signature and allocate your matrix in main with something like
unsigned (*order)[m] = malloc(sizeof(unsigned[n][m]));
Also, as you can see in the examples above, I'd suggest that you use the semantically correct types. Sizes are always best served with size_t and your permutation values look to me as if they will never be negative. Maybe for these you also should start counting from 0.
The following code snippet creates a 2d matrix for a given row and column. Please use this as a reference to debug your program.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int row, column;
int **matrix;
int i, j, val;
printf("Enter rows: ");
scanf("%d", &row);
printf("Enter columns: ");
scanf("%d", &column);
matrix = (int **) malloc (sizeof(int *) * row);
if (matrix == NULL) {
printf("ERROR: unable to allocate memory \n");
return -1;
}
for (i=0 ; i<row ; i++)
matrix[i] = (int *) malloc (sizeof(int) * column);
val=1;
for (i=0 ; i<row ; i++) {
for (j=0 ; j<column; j++) {
matrix[i][j] = val++;
}
}
for (i=0 ; i<row ; i++) {
for (j=0 ; j<column; j++) {
printf("%3d ", matrix[i][j]);
}
printf("\n");
}
return 0;
}
/*
Allocation of 2d matrix with only one call to malloc and
still get to access the matrix with a[i][j] format
the matrix is divided into headers and data.
headers = metadata to store the rows
data = actual data storage - buffer
allocate one contigious memory for header and data
and then make the elements in the header to point to the data are
<- headers -----><----------- data -----------
-----------------------------------------------------------------
| | | | | | .. |
| | | | | | .. |
-----------------------------------------------------------------
| ^
| |
|-----------------|
header points to data area
*/
/*
Output:
$ gcc 2darray.c
$ ./a.out
Enter rows: 10
Enter columns: 20
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
$
*/