Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Chuong tirnh nhap voa ky tu c
- // Neu c la ki tu hoa thi in ra thuong va nguoc lai
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- char s;
- scanf("%c",&s);
- if(s>='a' && s<='z')
- {
- s=s-32; // 32 la ki tu khoang trang
- // doi sang ki tu in hoa
- }
- else
- {
- if(s>='A' && s<='Z')
- {
- s=s+32;
- }
- }
- printf(" Ki tu sau khi chuyen doi: %c\n",s);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement