- 1 Eki 2019
- 27
- 0
#include<stdio.h>
int main(){
char c;
int fark;
fark=32;
int sayac=0;
while((c=getchar())!=EOF)
{
sayac++;
if(c>='a' && c<='z')
{
c-=fark;
if(c!='A' && c!='E' && c!='I' && c!='O' && c!='U')
printf("%c",c);
}
else if(c>='A' && c<='Z' && c!='A' && c!='E' && c!='I' && c!='O' && c!='U')
printf("%c",c);
}
printf("%d",sayac);
return 0;
}
I/O format:
Input: <set of characters> Output: <string of consonants in CAPITAL letters>[SPACE]<# of letters read>
Example:
Sample Input: a b kL m 45 ! u a m P ? % E
There are 10 characters in the input stream {a, b , k, L, m, u, a, m, P, E}.
10 is your first output.
The set of consonants in the input stream is: {B, K, L, M, M, P}.
2
Your second output will be the string of consonants in capital letters, as shown below:
Sample Output: BKLMMP 10
int main(){
char c;
int fark;
fark=32;
int sayac=0;
while((c=getchar())!=EOF)
{
sayac++;
if(c>='a' && c<='z')
{
c-=fark;
if(c!='A' && c!='E' && c!='I' && c!='O' && c!='U')
printf("%c",c);
}
else if(c>='A' && c<='Z' && c!='A' && c!='E' && c!='I' && c!='O' && c!='U')
printf("%c",c);
}
printf("%d",sayac);
return 0;
}
I/O format:
Input: <set of characters> Output: <string of consonants in CAPITAL letters>[SPACE]<# of letters read>
Example:
Sample Input: a b kL m 45 ! u a m P ? % E
There are 10 characters in the input stream {a, b , k, L, m, u, a, m, P, E}.
10 is your first output.
The set of consonants in the input stream is: {B, K, L, M, M, P}.
2
Your second output will be the string of consonants in capital letters, as shown below:
Sample Output: BKLMMP 10