ASCII码转换
来源:互联网 发布:上古世纪捏脸数据在那 编辑:程序博客网 时间:2024/05/21 17:52
想做一个加密信息的小程序,第一个想到的办法就是用书上看到的ASCII码,虽然不是很成功。还是留作纪念吧。
/************************* *ASCII transformation * * by:ZCB* *************************/#include<stdio.h>#include<stdlib.h>int main(void){ int a = 0; int b = 0; char c = 0; printf("If you want to convert a decimal number to ASCII characters,please input 1.\n"); printf("If you want to convert ASCII characters to a decimal number,please input 2.\n"); scanf("%d",&a); if(a == 1) { printf("Now we will convert a decimal number to ASCII characters.\nPlease input a decimal number.\n"); scanf("%d",&b); if(b >= 0&&b <= 127) printf("%c",b); else printf("You are so naughty.\nPlease input 1 or 2 next time.\n"); } else if(a == 2) { printf("Now we will convert ASCII characters to a decimal number.\nPlease input ASCII characters.\n"); fflush(stdin); scanf("%c",&c); if(c >= (char)0&&c <= (char)127) printf("%d",c); else printf("You are so naughty.\nPlease input 1 or 2 next time.\n"); } else { printf("You are so naughty.\nPlease input 1 or 2 next time.\n"); } system("pause"); return 0;}
0 0
- ASCII码转换文字
- ASCII码转换
- ASCII码转换
- 字符ASCII码转换
- C++ASCII码转换
- ASCII码转换
- javascript ascii码转换
- ASCII码表 & ASCII码转换函数
- 16进制码转换ASCII码
- ASCII码转换16进制码
- 字符串转换成ASCII码
- 16 进制码转换ASCII码
- perl ASCII码转换函数
- 转换字符为ASCII码
- ASCII码十六进制转换表
- JS 字符/ASCII码转换
- 字符串和AscII码转换
- ASCII码与字符串转换
- hdu5861 Road(线段树成段更新+优先队)
- SDUT2139图结构练习——BFS——从起始点到目标点的最短步数
- LeetCode 258: Add Digits 题解
- 50. Pow(x, n)
- sdut oj2143 图结构练习——最短路径
- ASCII码转换
- 在IntelliJ IDEA中使用JUnit5
- 给WebView添加漂亮的加载进度条
- 机器学习&数据挖掘笔记_16(常见面试之机器学习算法思想简单梳理)
- poj 3468 A Simple Problem with Integers
- HDU 5696 区间的价值
- 清楚浮动的几种方式overflow:hidden,overflow:auto,after伪类zoom:1;before div-clear:both;父级定义高度
- linux 内存清理/释放命令
- html超文本标记语言