Created
May 31, 2018 20:15
-
-
Save harconst/6bcb849d68e6348aa4a8854c861ae5fa to your computer and use it in GitHub Desktop.
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 <stdlib.h> | |
int main() | |
{ | |
char frash[60]; | |
int i, mikos, plithos; | |
printf("Dwse th frash sou\n"); | |
fgets(frash, 60, stdin); | |
printf("Pliktrologises: %s\n", frash); | |
mikos = strlen(frash); | |
for (i=0; i<mikos;i++) { | |
if (frash[i] == 82) { | |
plithos++; | |
frash[i] = frash[i] + 32; | |
} | |
} | |
printf("o xaraktiras R vrethike %d fores\n", plithos); | |
if (plithos % 2 == 0) { | |
printf("O arithmos forwn pou brika to R einai pollaplasio toy 2\n"); | |
} | |
if (plithos == 0) { | |
printf("O xaraktiras R de brethike\n"); | |
} | |
printf("To mhnuma me mikra r anti kefalaia R: %s\n", frash); | |
system("PAUSE"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment