[求助]!!!谢谢!! 同僚们帮忙呀!
编程由键盘输入一个字符,然后将该字符ASCII码的高4位和低4位分别输出!!
//编程由键盘输入一个字符,然后将该字符ASCII码的高4位和低4位分别输出!!
#include <stdio.h>
void in_out_put(char);
void in_out_put() { char c; printf("please enter the character :\t"); c=getchar(); if(c<=15) { printf("the high four position is : %d , the low four position is : %d",0,c); printf("\n"); } else printf("the high four positin is : %d , the low four position is : %d\n ",c-15,15); }
void main() { in_out_put(); }