Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
chazog
/
iax0583
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2262f354
authored
Dec 16, 2018
by
chazog
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upload New File
parent
b84b1d2b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
Lab11/Task1.c
Lab11/Task1.c
0 → 100644
View file @
2262f354
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int
check
(
char
word
[
20
],
char
CheckWord
[
20
]);
int
main
(){
int
i
=
0
;
int
Found
=
0
;
char
*
ptr
=
NULL
;
char
CheckWord
[
20
];
scanf
(
"%s"
,
CheckWord
);
ptr
=
strtok
(
wordCounts
,
"|"
);
while
(
ptr
!=
NULL
)
{
i
++
puts
(
ptr
);
ptr
=
strtok
(
NULL
,
" "
);
}
while
(
Found
==
0
){
i
++
;
if
(
strcmp
(
CheckWord
,
ptr
)
==
0
){
Found
=
1
;
printf
(
"%d"
,
i
);
return
0
;
}
}
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment