-
-
Save ebubekirtrkr/157a1f729de3f9b5be54164eddd481c9 to your computer and use it in GitHub Desktop.
2
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
//190410084 | |
int main() | |
{ | |
char cumle[255]; | |
printf("Bir cümle girin: \n"); | |
gets(cumle); | |
int cumle_uzunluk = strlen(cumle); | |
int k_sayisi = 0; | |
int l_sayisi = 0; | |
for (int i = 0; i < cumle_uzunluk; i++) | |
{ | |
char c = cumle[i]; | |
if (c == 'k' || c=='K') | |
k_sayisi++; | |
else if (c == 'l' || c=='L') | |
l_sayisi++; | |
} | |
printf("Cümledeki toplam harf sayisi: %d\n", cumle_uzunluk); | |
printf("Cümledeki k harflerinin sayisi: %d\n", k_sayisi); | |
printf("Cümledeki l harflerinin sayisi: %d\n", l_sayisi); | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment