Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- char kisbetuve(char c);
- char nagybetuve(char);
- int nagykisbetu()
- {
- printf("Megvaltoztatom a betud nagysagat\n");
- printf("Kerek szepen egy szoveget: \n");
- char c;
- while(scanf("%c",&c)==1)
- {
- if (c>='a'&&c<='z')printf("%c",nagybetuve(c));
- else if(c>='A'&&c<='Z')printf("%c",kisbetuve(c));
- else printf("%c",c);
- }
- return 0;
- }
- char nagybetuve(char c)
- {
- return c=c-'a'+'A';
- }
- char kisbetuve(char c)
- {
- return c=c-'A'+'a';
- }
Add Comment
Please, Sign In to add comment