码迷,mamicode.com
首页 >  
搜索关键字:print    ( 43532个结果
实现stren
#include int strlen(char array[])//定义函数strlen; { int i = 0; while(array[i] != '\0') { i++; } return i;}void main(){ char input[100...
分类:其他好文   时间:2014-08-25 21:02:34    阅读次数:149
C语言 输入任意字符串将其中的小写字母变大写字母
#includevoid main() { char c[]={0}; char d[]={0}; int i,k,j=0; printf("请输入任意的字符串:"); scanf("%s",c) ; k=strlen(c); for(i=0;...
分类:编程语言   时间:2014-08-25 21:02:14    阅读次数:247
数组排序
#includeint accept(int array[] ) { printf("请输入一个不超过五位数的数组:"); scanf("%s",array); } int sort(int array[]) { int i,tmp,j; for(i = 0; i ...
分类:其他好文   时间:2014-08-25 21:01:25    阅读次数:192
/*有数组{2,5,6,11,15,17,22,34,45},将用户输入的任意整数放入数组正确的位 置中,保证顺序不能乱掉。例如:用户输入9,那么数组为{2,5,6,9,11,15,17,22 ,34,45}*/
#includevoid main() { int array[]={2,5,6,11,15,17,22,34,45}; int j=0,tmp=0,m=0; printf("请输入任意一个正整数:"); scanf("%d",&array[10]); fo...
分类:其他好文   时间:2014-08-25 20:59:54    阅读次数:188
POJ 2305 Basic remains(JAVA练习)
Description Given a base b and two non-negative base b integers p and m, compute p mod m and print the result as a base b integer. p mod m is defined as the smallest non-negative integer k such tha...
分类:编程语言   时间:2014-08-25 19:20:04    阅读次数:230
PHP ADLogin
'; echo ldap_error( $conn ); exit; } #print_r($info); if( $info) { $values = @ldap_get_values_len($conn, $entry, ...
分类:Web程序   时间:2014-08-25 19:14:24    阅读次数:241
python “类变量”和“类的实例变量” 区别
1 class Count():2 count=03 def __init__(self,count):4 self.count=count5 self.__class__.count+=1运行结果>>>>>>ct1=Count(3)>>>print ...
分类:编程语言   时间:2014-08-25 19:08:44    阅读次数:189
装饰者模式
模式说明装饰者模式装饰者模式可以动态地给一个对象增加一些额外的职责。就增加功能来说,装饰者模式相比生成子类更为灵活。模式结构图程序示例说明:一辆车,装饰窗户,装饰轮子代码:class Car(object): def description(self): print 'basic...
分类:其他好文   时间:2014-08-25 19:03:54    阅读次数:209
awk
filename 当前输入文件的名称NR 当前输入文件的总行数NF 当前行记录中的字段数OFS 输出字段的分隔符FS 输入字段的分隔符awk '{print "%s %-8s\n",$3,$1}' filenamecat /etc/passwd|awk '{FS=":"} $3<10 {print ...
分类:其他好文   时间:2014-08-25 16:40:14    阅读次数:226
调用组件的C++代码
#include#include "LJSummary.h"#includeint main(void){ printf("-----\n"); if(DS_Init("",1)) { printf("success-----\n"); }else { printf("failed-----\n.....
分类:编程语言   时间:2014-08-25 16:36:04    阅读次数:196
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!