Advertisement
derazanother

none

Jan 8th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int n;
  4. char ch[10];
  5.  
  6. int main()
  7. {
  8. void update(char[10] ,int);
  9.  
  10.  
  11. do{
  12. printf("Enter String4-10char: ");
  13. fflush(stdin);
  14. scanf("%[^\n]",ch);
  15. n = strlen(ch);
  16. }while (n<4||n>10);
  17. printf("%d",n);
  18. update(ch,n);
  19.  
  20. return 0;
  21. }
  22.  
  23.  
  24. void update(char x[10] , int y ){
  25. char d[10];
  26. int i,c=0;
  27. printf("stringturntoplusexpected'a' 'e' 'i' 'o' 'u'");
  28. printf("Output: ");
  29. for(i=0;i<y;i++){
  30. if(x[i]=='a'||'e'||'i'||'o'||'u'){
  31. d[i]= toupper(x[i]);
  32. printf("%[^\n]",d[i]);
  33. c++;
  34. }
  35. }
  36. return;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement