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 ...
随机推荐
- Python--动态类型
函数的参数传递,本质上传递的是引用.比如说: def f(x): x = 100 print x a = 1 f(a) print a 输出结果为: 100 1 参数x是一个新的引用,指向a所指的对象 ...
- 谈C#中的Delegate
引言 Delegate是Dotnet1.0的时候已经存在的特性了,但由于在实际工作中一直没有机会使用Delegate这个特性,所以一直没有对它作整理.这两天,我再度翻阅了一些关于Delegate的资料 ...
- 数据挖掘算法-Apriori Algorithm(关联规则)
http://www.cnblogs.com/jingwhale/p/4618351.html Apriori algorithm是关联规则里一项基本算法.是由Rakesh Agrawal和Ramak ...
- jackson使用示例
Jackson可以轻松的将Java对象转换成json对象和xml文档,同样也可以将json.xml转换成Java对象. Jackson 2.x版提供了三个JAR包供下载: 1. Core库:strea ...
- 基于linux2.6.38.8内核zImage文件的自解压详解
转载:http://blog.csdn.net/wavemcu/article/details/7270439 ******************************************** ...
- A*算法解决八数码问题 Java语言实现
0X00 定义 首先要明确一下什么是A*算法和八数码问题? A*(A-Star)算法是一种静态路网中求解最短路径最有效的直接搜索方法也是一种启发性的算法,也是解决许多搜索问题的有效算法.算法中的距离估 ...
- C. Mobile phones
Suppose that the fourth generation mobile phone base stations in the Tampere area operate as follows ...
- Java基础知识强化之IO流笔记82:NIO之 Pipe(管道)
1. Java NIO 管道是2个线程之间的单向数据连接.Pipe有一个source通道和一个sink通道.数据会被写到sink通道,从source通道读取. 这里是Pipe原理的图示: 2. Pip ...
- UITableView 的增删改 自定义UITableViewCell
1.UITableView的增删改 //设置编辑模式 [self.tableView setEditing:YES animated:YES]; //可以不写 - (BOOL)tableView:(U ...
- find中的 time 参数
find手册中对time的解释:以 atime 为例: -atime n File was last accessed n*24 hours ago. When find figures out ho ...