Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char ch[10];
- #include <stdio.h>
- int main(){
- int n,c=0,i;
- char ch[10],d[10];
- void update(char[10],int);
- do{
- printf("Enter a String (4-10): ");
- __fpurge(stdin);
- gets(ch);
- n = strlen(ch);
- }while(n<4||n>10);
- printf("String \"%s\" wii be replaced the consonant with '+' and convert vowel to upper case.\n ",ch);
- printf("Output ");
- for(i=0;i<n;i++){
- if(ch[i] == 'a'||ch[i] == 'e'||ch[i] == 'i'||ch[i] == 'o'||ch[i] == 'u'){
- d[i] = toupper(ch[i]);
- printf("%c",d[i]);
- c++;
- }
- else {
- printf("+");
- }
- }
- return (0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement