daily pastebin goal
76%
SHARE
TWEET

Untitled

a guest Dec 11th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main()
  5. {
  6.   char slowo[100];
  7.   char *haslo = "zgodne";
  8.  
  9.   scanf("%s", &slowo);
  10.  
  11.   int x = strcmp(slowo, haslo);
  12.  
  13.   if(x == 0)
  14.   {
  15.     printf("Podales prawidlowe haslo.\n");
  16.     return 0;
  17.   }
  18.  
  19.   while(x != 0)
  20.   {
  21.     scanf("%s", &slowo);
  22.     x = strcmp(slowo, haslo);
  23.     if(x == 0)
  24.     {
  25.       printf("Podales prawidlowe haslo.\n");
  26.     }
  27.   }
  28.  
  29.   return 0;
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top