Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* do vAN HA => Do Van, Ha*/
- #include<stdio.h>
- #include<string.h>
- #include<ctype.h>
- char s[100], *p, a[50][50];
- int i, dem=0;
- void tach(){
- p=strtok(s, " ");
- while (p!='\0'){
- strcpy(a[dem], p);
- dem++;
- p=strtok(NULL, " ");
- }
- }
- void inkq(){
- for(i=0; i<dem; i++){
- a[i][0]=toupper(a[i][0]);
- }
- for(i=0; i<=dem-1; i++){
- printf("%s", a[i]);
- if(i == dem-2) printf(", ");
- else printf(" ");
- }
- }
- main(){
- gets(s);
- strlwr(s);
- tach();
- inkq();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement