Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- int main()
- {
- int ch;
- int broken = 1;
- ch = getchar();
- while(ch != EOF) {
- if(broken && isalpha(ch)) {
- broken = 0;
- putchar(toupper(ch));
- } else {
- putchar(ch);
- }
- if(ch == '.' || ch == '\n' || ch == '\r') {
- broken = 1;
- }
- ch = getchar();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment