20150721输入年号,判断干支纪年和生肖
来源:互联网 发布:数控多头螺纹怎么编程 编辑:程序博客网 时间:2024/04/28 12:51
#include<iostream>using namespace std;int main(){int a,b,c,year;cout<<"请输入需要判断的年号:";cin>>year;cout<<endl;a=(year%10+7);if(a>10)a=(a-10);c=b=(year%12+9);if(b>12)c=b=(b-12);cout<<"您输入的年号是";switch(a){case 1:cout<<"甲";break;case 2:cout<<"乙";break;case 3:cout<<"丙";break;case 4:cout<<"丁";break;case 5:cout<<"戊";break;case 6:cout<<"己";break;case 7:cout<<"庚";break;case 8:cout<<"辛";break;case 9:cout<<"壬";break;case 10:cout<<"癸";break;default:;break;}switch(b){case 1:cout<<"子";break;case 2:cout<<"丑";break;case 3:cout<<"寅";break;case 4:cout<<"卯";break;case 5:cout<<"辰";break;case 6:cout<<"巳";break;case 7:cout<<"午";break;case 8:cout<<"未";break;case 9:cout<<"申";break;case 10:cout<<"酉";break;case 11:cout<<"戌";break;case 12:cout<<"亥";break;default:;break;}cout<<"年,生肖是";switch(c){case 1:cout<<"鼠";break;case 2:cout<<"牛";break;case 3:cout<<"虎";break;case 4:cout<<"兔";break;case 5:cout<<"龙";break;case 6:cout<<"蛇";break;case 7:cout<<"马";break;case 8:cout<<"羊";break;case 9:cout<<"猴";break;case 10:cout<<"鸡";break;case 11:cout<<"狗";break;case 12:cout<<"猪";break;default:;break;}cout<<"年。";system("pause"); return 0;}
0 0
- 20150721输入年号,判断干支纪年和生肖
- php函数 判断干支、生肖和星座 (转)
- 干支纪年
- 干支纪年
- 干支纪年和纪日算法
- JS类库整理–判断干支、生肖和星座 –js
- 干支纪年法
- 5.干支纪年法
- 【第三届蓝桥杯】干支纪年
- Sexagenary Cycle(干支纪年)
- 蓝桥杯 干支纪年 坐标计算
- 蓝桥杯填空题干支纪年
- Java实现干支纪年法
- 从键盘任意输入一个年号,并判断它是否是润年
- 2012蓝桥杯【初赛试题】干支纪年
- 2012蓝桥杯【初赛试题】干支纪年
- 干支纪年,2015为什么是乙未年?
- java干支纪年法的计算
- Lua ---- LFS库的使用
- 多表联查 若某一字段相同 且有状态跟时间字段,选取该状态下 时间最近的一条数据
- create schema 语句
- 原生Quartz 使用与配置
- socket异步通信:如何设置成非阻塞模式,非阻塞模式下判断connect成功(失败),判断recv/recvfrom成功(失败),判断send/sendto
- 20150721输入年号,判断干支纪年和生肖
- Nim Game
- Could not resolve view with name 'pcir/del' in servlet with name 'forum'
- centos 创建用户(可ssh连接)
- Python类继承的高级特性
- 虚拟化概念
- android开源项目框架大全-IT蓝豹
- List <Map> 排序详解
- POJ2065 SETI 高斯消元