- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 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
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
//типа explode в php;
{
int i=0;
//char s=';';
char s=argv[2][0];
i=100;
//char** data;
//data=(char**)malloc(i+1);
char data[1000][1000];
char* str;
str=malloc(i+1);
str=argv[1];
printf("%s\n",str );
int n=0;
int m=0;
while (*str) {
if (*str==s)
{m++;n=0;str++;continue;};
data[m][n]=*str;
str++;n++;
};
printf("%s\n",data[0] );
}
Вас там штрафуют за количество строк?
https://wandbox.org/permlink/IYj93ntrjwgxpxlt
https://wandbox.org/permlink/IYj93ntrjwgxpxlt