Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2016
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. char name[27];
  4. int namlen;
  5.  
  6. printf("Enter a series of names and type 'end' to stop:\n");
  7.  
  8. do
  9. {
  10. namelen = strlen(name);
  11. if(name[namelen-1] == '\n')
  12. name[namelen-1] = '\0');
  13. //How and where should this be added? --> while !strchr( name , '\n') { fgets(name,26,stdin); }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement