Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main()
- {
- char slowo[100];
- char *haslo = "zgodne";
- scanf("%s", &slowo);
- int x = strcmp(slowo, haslo);
- if(x == 0)
- {
- printf("Podales prawidlowe haslo.\n");
- return 0;
- }
- while(x != 0)
- {
- scanf("%s", &slowo);
- x = strcmp(slowo, haslo);
- if(x == 0)
- {
- printf("Podales prawidlowe haslo.\n");
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement