Created
May 23, 2015 12:21
-
-
Save muhammetkurt/846971d0a94fd466f3a4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*parola_uygulamasi.c | |
strcmp ile parola uygulaması */ | |
#include<stdio.h> | |
#include<string.h> | |
#include<stdlib.h> | |
#include<ctype.h> | |
int main(){ | |
char parola[40]; | |
char string[40]; | |
int kontrol,dene=1; | |
puts("Parola Belirle(Max 40 karakter): "); | |
gets(parola); | |
printf("Sistemi acmak icin parolayi girin: "); | |
gets(string); | |
kontrol=strcmp(parola,string); | |
while( kontrol!=0 ){ | |
printf("\nYanlis Sifre Girildi"); | |
printf("\nYeniden denemek icin :1"); | |
printf("\nCikis icin : 0"); | |
scanf("%d",&dene); | |
if(dene==1){ | |
printf("\nSistemi acmak icin parolayi girin: "); | |
scanf("%s",string); | |
} | |
else | |
break; | |
kontrol=strcmp(parola,string); | |
} | |
if(dene==0) | |
puts("Programi kullandiginiz icin tesekkurler:"); | |
else | |
puts("Hosgeldiniz Sn. Muhammet Kurt"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment