码迷,mamicode.com
首页 >  
搜索关键字:input    ( 33491个结果
判断三角形的类型
接受用户输入的三个整数,作为三角形的三条边,并判断此三角形的类型。#include#includeint main(void){ int a; int b; int c; printf("please input a:"); scanf("%d", &a); pr...
分类:其他好文   时间:2014-06-25 17:36:48    阅读次数:138
将字符串中多余的空格去掉
#include#includeint main(void){ char str[100]; char des[100]; printf("input a string:"); gets(str); int i = 0; int j = 0; int bla...
分类:其他好文   时间:2014-06-25 17:36:11    阅读次数:163
关于jQuery中.attr()和.prop()
功能需求是这样的,两个radio:男和女,一个button:重置。启动页面默认选中男,在用户选择女之后又点击重置按钮,需要恢复到默认状态。男女重置我的js代码是这样的:$("#reSet").click(function() { $("input[name='sex']:first").attr(....
分类:Web程序   时间:2014-06-25 16:31:06    阅读次数:173
Dreamhost 提示No input file specified. 的解决办法
如果开启FastCGI模式,.htaccess无法生效,一直提示no input file specified。 因为在Fastcgi模式下,php不支持rewrite的目标网址的PATH_INFO的解析  ThinkPHP运行在URL_MODEL=2时,会出现 No input file specified.的情况,  这时可以修改网站目录的.htaccess文件:(by default7...
分类:其他好文   时间:2014-06-25 00:23:53    阅读次数:209
String to Integer (atoi)
题目 Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possibl...
分类:其他好文   时间:2014-06-24 23:14:28    阅读次数:238
Reverse Words in a String
【问题】 Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". 【代码】 class Solution: # @param s, a string # @retu...
分类:其他好文   时间:2014-06-24 21:00:30    阅读次数:168
Linux下shell编程实例
1. 判断一文件是不是块或字符设备文件,如果是将其拷贝到 /dev 目录下 read -p "input a file:" filename if [ -b $filename -o -c $filename ] then cp $filename /dev/ fi 2.编写一个脚本,进行简单的减法运算,要求提示输入变量 #!/bin/bash read -...
分类:系统相关   时间:2014-06-24 20:59:09    阅读次数:434
bzoj 1799: [Ahoi2009]self 同类分布 题解
【原题】 1799: [Ahoi2009]self 同类分布 Time Limit: 50 Sec  Memory Limit: 64 MB Submit: 554  Solved: 194 [Submit][Status] Description 给出a,b,求出[a,b]中各位数字之和能整除原数的数的个数。 Input Output Sample ...
分类:其他好文   时间:2014-06-24 18:38:02    阅读次数:295
简明Python教程笔记(二)----用户交互raw_input()
raw_input()python内建函数将所有输入看做字符串,返回字符串类型input()对待纯数字输入时具有自己的特性,它返回所输入的数字的类型(int,float)input()本质上还是使用raw_input()来实现的,只是调用完raw_input()之后再调用eval()函数例子:#!/usr/bin/envpythonthis_year=2..
分类:编程语言   时间:2014-06-24 16:57:50    阅读次数:297
打印简单公司员工信息表
要求,输入name不为空,输入次数最多3次,3次后跳出程序;知识点:raw_inputstr转intwhilifelifelsecontinuebreakfor导入模块引用变量值格式化输出vim#!/usr/bin/envpython importsys user_name="carson" this_year=2014 counter=0 whileTrue: ifcounter<3: name=raw_input(..
分类:其他好文   时间:2014-06-24 16:52:27    阅读次数:290
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!