age
#include<iostream>
#include<math.h>
#define pi 3.14
using namespace std;
int main()
{
int computeday(int y[],int m[],int day[]);
double compute_physiological_index(int d);
double compute_emotional_index(int d);
double compute_mentality_index(int d);
int year[];
int month[];
int day[];
int d;
cout << "Please input your birthday:" << endl;
cin >> year[] >> month[] >> day[];
cout << "Please input today:" << endl;
cin >> year[] >> month[] >> day[];
d = computeday(year,month,day);
cout << compute_physiological_index(d) << endl;
cout << compute_emotional_index(d) << endl;
cout << compute_mentality_index(d) << endl;
return ;
}
int computeday(int y[],int m[],int day[])
{
int d=;
int x[]={,,,,,,,,,,,};
if( ( ( y[] % == ) || ( y[] % != ) && ( y[] % == ) ) && m[] <= )
{
if(m[] == )
d += - day[] - ;
else
d += - day[];
}
else
{
if(y[] < y[])
{
for( ; m[] <= ; ++ m[] )
d += x[m[]-];
}
}
for(y[] += ;y[] < y[]; y[] ++)
{
m[] = ;
x[] = ;
if( ( y[] % == ) || ( y[] % != ) && ( y[] % == ) )
x[] += ;
for(;m[] < ;m[] ++)
d += x[m[]-];
}
for(;m[] < m[];m[] ++)
d +=x[m[]-];
d += day[];
d = d - day[] + ;
cout<<d<<endl;
return d;
}
double compute_physiological_index(int d)
{
return (sin(d**pi/));
}
double compute_emotional_index(int d)
{
return (sin(d**pi/));
}
double compute_mentality_index(int d)
{
return (sin(d**pi/));
}
age的更多相关文章
- 根据对象的某一属性进行排序的js代码(如:name,age)
var data = [{ name: "jiang", age: 22 }, { name: "AAAAAAAAAAAAAA", age: 21 }, { n ...
- 关于一道数据库例题的解析。为什么σ age>22 (πS_ID,SCORE (SC) ) 选项是错的?
本人大二学子.近段时间在做数据库复习题的时候遇到一道题,如下. 有关系SC(S_ID,C_ID,AGE,SCORE),查找年龄大于22岁的学生的学号和分数,正确的关系代数表达式是( ) . ⅰ. πS ...
- Java-集合-第三题 有如下Student 对象, private String name; private int age; private int score; private String classNum; 其中,classNum 表示学生的班号,例如“class05”。 有如下List List list = new ArrayList(); l
第三题 有如下Student 对象, private String name; private int age; private int score; private String classNum; ...
- 第三题 有如下Student 对象, private String name; private int age; private int score; private String classNum; 其中,classNum 表示学生的班号,例如“class05”。 有如下List List list = new ArrayList();
list.add(new Student("Tom", 18, 100, "class05")); list.add(new Student("Jer ...
- 编写Java应用程序。首先,定义描述学生的类——Student,包括学号(int)、 姓名(String)、年龄(int)等属性;二个方法:Student(int stuNo,String name,int age) 用于对对象的初始化,outPut()用于输出学生信息。其次,再定义一个主类—— TestClass,在主类的main方法中创建多个Student类的对象,使用这些对象来测 试Stud
package zuoye; public class student { int age; String name; int stuNO; void outPut() { System.out.pr ...
- LINQ TO ENTITY 根据Birthday获取Age
from emp in EmployeeInfo let years = EntityFunctions.DiffYears(emp.Birthday.Value,DateTime.Now) let ...
- 【UVA 11462】 Age Sort(基数排序)
题 题意 给你最多2000000个数据,大小是1到99的数,让你排序输出. 分析 快排也可以过.不过这题本意是要基数排序(桶排序),就是读入年龄age, a[age]++,然后输出时,从1到99岁(看 ...
- Why The Golden Age Of Machine Learning is Just Beginning
Why The Golden Age Of Machine Learning is Just Beginning Even though the buzz around neural networks ...
- UVa 11462 Age Sort
解题报告:给若干个居民的年龄排序,年龄的范围在1到100之间,输入的总人数在0到200W.这题要注意的输入的文件约有25MB,而内存限制为2MB,所以如果人数是像200W这样多的话,甚至都不能把它们都 ...
- 首先,定义描述学生的类——Student,包括学号(int)、 姓名(String)、年龄(int)等属性;二个方法:Student(int stuNo,String name,int age) 用于对对象的初始化,outPut()用于输出学生信息。其次,再定义一个主类—— TestClass,在主类的main方法中创建多个Student类的对象,使用这些对象来测 试Student类的功能。
package lianxi; public class Student { String Name; int XveHao,Age; Student(String Name,int XveHao,i ...
随机推荐
- Linux文件空洞与稀疏文件 转
1.Linux文件空洞与稀疏文件 2.文件系统数据存储 3.文件系统调试 文件空洞 在UNIX文件操作中,文件位移量可以大于文件的当前长度在这种情况下,对该文件的下一次写将延长该文件,并在 ...
- error C2440:“类型转换":无法从“void (__thiscall Play1::* )(int *)”转换为“cocos2d::SEL_CallFucN
转自:http://zhidao.baidu.com/link?url=VfSSkA0xfTVwNKaKh4tqW_sXlcsK-Rb16nEtQw5zaq5_306lnwJN3Kdb-rFp-r4L ...
- java中无符号类型的处理
在Java中,不存在Unsigned无符号数据类型,但可以轻而易举的完成Unsigned转换. 方案一:如果在Java中进行流(Stream)数据处理,可以用DataInputStream类对Stre ...
- JavaScript跨域实现
最近在做个上传文件的服务,其中包含一个上传的web页面.目的是想客户端页面嵌套这个web页面,然后直接将文件上传到服务器. 因为文件不同所以需要保存到的文件夹名称也不一样,所以客户端需要传递一个文件夹 ...
- [HTML] Google IE-x.js 解决IEx与W3C标准的冲突
如果分别用IE5.IE6.IE7浏览同一个网页,将可能出现不一样的效果.这是它们之间对CSS的解析选择器不一样或错误和个别bug所导致.为了解决这些错误和bug.我们不得不找到一个能平衡于它们之间的解 ...
- Linq中使用Left Join
use Test Create table Student( ID ,) primary key, ) not null ) Create Table Book( ID ,) primary key, ...
- JDBC驱动的四种类型
Java中的JDBC驱动可以分为四种类型,包括JDBC-ODBC桥.本地API驱动.网络协议驱动和本地协议驱动. JDBC驱动类型一.JDBC-ODBC桥 JDBC-ODBC 桥 是sun公司提供的, ...
- HTML超出文本显示省略号...[text-overflow]
需要对div或者span同时应用Css: text-overflow:ellipsis; white-space:nowrap; overflow:hidden; 即可实现所想要得到的溢出文本显示省略 ...
- BI跟报表一样吗?
一.报表≠BI很多的人认为,报表就是BI.实际上,报表只是BI的一部分,虽然BI应用的结果通常需要通过报表来展示,但是,BI绝对不仅仅是报表.其实,大家对这些概念的理解,如同15年前的ERP一样.19 ...
- 51nod 棋盘问题(博弈论)
题目链接: 棋盘问题 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 上帝创造了一个n*m棋盘,每一个格子都只有可能是黑色或者白色的. 亚当和夏娃在玩一个游戏,每次寻找边长为x的正方 ...