20170314
来源:互联网 发布:程序员培训全日制吗 编辑:程序博客网 时间:2024/04/30 08:00
#include <iostream>
#include <time.h>
using namespace std;
int main()
//srand(time(0));
//j = rand() % 100 + 1;
//cout<<"Guess a FUCKING number between 1~99\n";
//while(cin >> i)
//{
// /*if (cnt = 5)
// {
// cout << "" << j % 10;
// }*/
//
//
// if (i < j)
// {
// cout << "Maybe it is more bigger than your thoughts\n";
// cnt++;
// continue;
// }
// else
// if (i > j)
// {
// cout << "Maybe it is more smaller than your thoughts\n";
// cnt++;
// continue;
// }
//
// /*cout << "Maybe it is more flexible than your thoughts\n";*/
// else;
// break;
//
//}
//
//cout << "Congratulations! You finally got it in " << cnt << " times\n";
//
//int arr1[3] = { 1, 3, 4 };
//int *pi = arr1;
//printf("%d\n", *(pi+1));
int y=2017,y2,m=3,m2, d=15,d2,;//Year,Month,Day
/*int arr[] = { 1,-1,0,0,1,1,2,3,3,4,4,5 };
int *pi = arr;
*/
cin >> "Input your Date" >> y2 >> m2 >> d2;
/*sum = (y2 - y) * 365 + (m2 - m) * 30 + (d2 - d) + *(pi + m);*/
sum = y2 + m2 + d2;
cout << "Distance is " << sum << " days";
system("pause");
return 0;
}
#include <time.h>
using namespace std;
int main()
{
猜数字1.1版本
//srand(time(0));
//j = rand() % 100 + 1;
//cout<<"Guess a FUCKING number between 1~99\n";
//while(cin >> i)
//{
// /*if (cnt = 5)
// {
// cout << "" << j % 10;
// }*/
//
//
// if (i < j)
// {
// cout << "Maybe it is more bigger than your thoughts\n";
// cnt++;
// continue;
// }
// else
// if (i > j)
// {
// cout << "Maybe it is more smaller than your thoughts\n";
// cnt++;
// continue;
// }
//
// /*cout << "Maybe it is more flexible than your thoughts\n";*/
// else;
// break;
//
//}
//
//cout << "Congratulations! You finally got it in " << cnt << " times\n";
//
简单的指针操作
//int arr1[3] = { 1, 3, 4 };
//int *pi = arr1;
//printf("%d\n", *(pi+1));
日期计算器
int y=2017,y2,m=3,m2, d=15,d2,;//Year,Month,Day
/*int arr[] = { 1,-1,0,0,1,1,2,3,3,4,4,5 };
int *pi = arr;
*/
cin >> "Input your Date" >> y2 >> m2 >> d2;
/*sum = (y2 - y) * 365 + (m2 - m) * 30 + (d2 - d) + *(pi + m);*/
sum = y2 + m2 + d2;
cout << "Distance is " << sum << " days";
system("pause");
return 0;
}
0 0
- 20170314
- 【Java每日一题】20170314
- 20170314-leetcode-278-First Bad Version
- 0001-Verilog语言学习笔记/20170314
- 20170314MFC03_滑块热键列表框
- 20170314,开启菜鸡进化之旅。
- 20170314_Android数据存储之SQLite数据库
- 20170314-Allegro出图5-坐标文件(allegro中出)
- 20170314 睡一觉起来,解决了昨晚好几个bug
- CSDN日报20170314——《40岁程序员真的要被淘汰了么?》
- 根据一只猿前辈的TPLINK和海康威视漏扫工具改进的IPscanner成果展示(20170314 更新)
- 面向对象编程
- innodb_flush_method
- 面试题-----两个栈实现一个队列
- RecyclerView存在大量Item时,当滚到底部时快速滑到顶部
- Qt Creator 管理多工程的实践
- 20170314
- house robber
- iPhone屏幕尺寸、分辨率及适配
- JAVA Agent 简析及开发示例
- GCC主要数据结构之cpp_token
- 推荐系统_电影推荐
- Oracle 12c – Rename Pluggable Database
- PowerDesigner导出数据库表结构
- java面试提纲