码迷,mamicode.com
首页 >  
搜索关键字:count    ( 18169个结果
判断1000年---2000年之间的闰年
用c语言编辑程序://四年一闰,百年不闰,四百年再闰#include<stdio.h>intmain(){intcount=0;intyear=0;for(year=1000;year<=2000;year++){if(year%4==0){if(year%100!=0){printf("%d",year);count++;}}if(year%400==0){printf("%d",year);count++;}}printf("\ncount=%d..
分类:其他好文   时间:2015-11-02 06:45:41    阅读次数:258
Oracle查询经典
1.检索部门编号、部门名称、部门所在地及其每个部门的员工总数。select d.deptno,d.dname,d.loc,count(*) from emp e,dept d where e.deptno=d.deptno group by d.deptno,d.dname,d.loc;2.检索员工...
分类:数据库   时间:2015-11-02 00:00:22    阅读次数:1004
GitHub上传项目之初体验
git工具是很早之前安装的,之前还没有github账号,现在注册了一个,想学一下托管自己的项目和代码。 登录github账号之后,点击绿色的"New repository",输入名称和注释。 打开git工具,用cd命令进入到项目所在目录,比如我的count项目位于D/myeclipse/sp...
分类:Web程序   时间:2015-11-01 16:30:32    阅读次数:216
python 一个小程序开启博客之旅:
#_*_ coding:utf-8 _*_print_num = input ('which loop do you want it to be printed out?')count = 0while count < 100000:if count == print_num: print 'th....
分类:编程语言   时间:2015-11-01 06:50:00    阅读次数:231
将一个无符号十进制数的二进制逆转,然后以输出
#define_CRT_SECURE_NO_WARNINGS#include<stdio.h>intmain(){intm=0,n=0,x=0,y=0;inti=0,count=0;printf("请输入m和n:\n");scanf("%d%d",&m,&n);for(i=0;i<32;i++){x=(m>>i)&1;y=(n>>i)&1;if(x!=y)count++;}printf("m和n有%d个位不同\n",..
分类:其他好文   时间:2015-11-01 01:47:10    阅读次数:158
c语言,将字符串逆置,如"i am a student"逆置为"student a am i"
#include<stdio.h> #include<assert.h> /*求字符串长度*/ intmy_strlen(char*str) { assert(str); intcount=0; while(*str) { count++; str++; } returncount; } /*逆置函数*/ char*reverse_str(char*start,char*end) { char*ret=start; chartemp; whi..
分类:编程语言   时间:2015-10-31 18:43:19    阅读次数:200
HDU 1207
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1207四柱汉诺塔问题当r = (sqrt(8*n+1)-1)/2 时,存在 count =(n-(r*r-r+2)/2)*(int)pow(2,r)+1 ,此时所需的步骤最少。 1 #include 2 ...
分类:其他好文   时间:2015-10-31 15:32:58    阅读次数:176
处理PHP中字符串的常用操作及函数
【合肥开源IT教育】【php培训】【开源IT教育】【合肥php培训】【合肥软件开发】1. 确定一个字符串的长度这是最为常见和基础的例子,对于确定一个字符串的长度,我们应该使用strlen()函数,比如要获取下面字符串$text 的长度:$text = "sunny day"; $count = s....
分类:Web程序   时间:2015-10-31 11:19:00    阅读次数:175
keepalive监控nginx
#!/bin/bashwhile:do###processcountNGINX_COUNT=`ps-Cnginx--no-header|wc-l`KEEPALIVED_COUNT=`ps-Ckeepalived--no-header|wc-l`#if[$NGINX_COUNT-eq0]&&[$KEEPALIVED_COUNT-eq0];then#/etc/init.d/nginxrestart&&/etc/init.d/keepalivedrestartif[$NGINX_CO..
分类:其他好文   时间:2015-10-31 01:49:32    阅读次数:256
HDU 5056 Boring count(BestCoder Round #11 (Div. 2))
Problem Description:You are given a string S consisting of lowercase letters, and your task is counting the number of substring that the number of eac...
分类:其他好文   时间:2015-10-30 20:22:11    阅读次数:169
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!