第二章作业P51.7
2015-04-02 20:03
197 查看
#include<iostream> #include<stdio.h> using namespace std; int main() { char ch1,ch2; cin>>ch1>>ch2; char ch; do{ if((ch1-ch2)%2==0) { if(ch1>ch2) cout<<(char)(ch1+1)<<endl; else cout<<(char)(ch2+1)<<endl; } else { if(ch1<ch2) cout<<(char)(ch1-1)<<endl; else cout<<(char)(ch2-1)<<endl; } printf("是否继续?\[y/n]"); while((ch=getchar())!='\n'); }while((ch=getchar())=='y'); return 0; }
相关文章推荐
- 数据库原理第二章作业
- 课程作业第二章2-6
- 软件工程导论第二章作业2.2
- 第二章linux历史 作业
- Linux第二章作业
- 鸟哥的Linux私房菜(基础篇)-第二章、 Linux 如何学习(二.3. 有心朝Linux作业系统学习者的学习态度)
- 第二章作业P51.12(求爱因斯坦数学题。)
- 第二章作业
- 第二章作业
- 课程作业第二章2-6
- 软件工程 第二章作业
- 第二章作业
- 第二章课后作业
- 二期 , 第二章 数据库的实现---- 课后作业--- 创建图书馆管理系统数据库
- 李红霞作业第二章52页22题
- 【深入理解计算机系统-第二版】第二章部分家庭作业(Homework)参考答案
- CS231n 2016 通关 第二章-KNN 作业分析
- 利用python编写设计多线程web服务器(计算机网络_自顶向下第六版_第二章1和4的编程作业)
- [置顶] CSAPP第二章家庭作业参考答案
- 第二章作业