Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- USES crt;
- VAR nhap: char;
- (*******************************************************)
- Procedure nhapChuSo;
- Begin
- Write('Hay viet 1 chu can doi thanh chu hoa : ');
- readln(nhap);
- End;
- (*******************************************************)
- Function thaydoi(nhap : char): char;
- Begin
- if( 'a' <= nhap ) and ( nhap <= 'z' ) then thaydoi:= ( CHR(ORD(nhap) - 32 ) )
- else thaydoi:= '?'
- End;
- (*******************************************************)
- BEGIN
- nhapChuSo;
- writeln( thaydoi(nhap) );
- END.
Advertisement
Add Comment
Please, Sign In to add comment