#include int main() { int x=1234; float f=123.456; double m=123.456; char ch='a'; char a[]="Hello, world!"; // 定义一个数组a,数组中连续存放了字符串常量hello,world! int y... ...
分类:
其他好文 时间:
2019-04-02 22:45:09
阅读次数:
199
连续输入输出#include<stdio.h>intmain(){intch=0;while((ch=getchar())!=EOF){if(ch>=‘a‘&&ch<=‘z‘){putchar(ch-32);}elseif(ch>=‘A‘&&ch<=‘Z‘){putchar(ch+32);}else{;}}return0;}
分类:
其他好文 时间:
2019-03-28 13:38:43
阅读次数:
171
1.chr(10).isnumeric() : Flase1.isnumeric() 方法检测字符串是否只由数字组成。这种方法是只针对unicode对象。2.isinstance(255,int)isinstance() 函数来判断一个对象是否是一个已知的类型,类似 type()。True3. ch ...
分类:
编程语言 时间:
2019-03-28 09:46:03
阅读次数:
236
前言 之前一直在想页面上如果一个字段只有固定的几个选项,类似select下拉框这种,如果在表里面设置一个外键的话,是不是有点傻了,这样为了几个选项弄一张表不值得。 后来看到Django模型中的字段有个choices属性,在设计模型的时候,只需把字段参数加个choices即可,看样子是我想多了~ ch ...
分类:
编程语言 时间:
2019-03-28 00:42:13
阅读次数:
187
#include using namespace std; inline int read() { int x = 0,ff = 1; char ch = getchar(); while(!isdigit(ch)) { if(ch == '-') ff = -1; ch = getchar(); ... ...
分类:
其他好文 时间:
2019-03-27 21:27:40
阅读次数:
164
"传送门" 树上差分+线段树合并+离散化 对于修改的路径,树上差分就好了 代码: c++ include include include include include using namespace std; void read(int &x) { char ch; bool ok; for(ok ...
分类:
其他好文 时间:
2019-03-26 22:38:38
阅读次数:
173
#include<bits/stdc++.h> #define il inline #define reg register int #define numb (ch^'0') using namespace std; typedef long long ll; il void rd(int &x) ...
分类:
其他好文 时间:
2019-03-24 13:40:21
阅读次数:
135
例3 10 统计字符 程序核心——switch语句与循环语句镶嵌 程序 include int main() { int blank,digit,i,other; char ch; blank=digit=other=0; printf("Enter 10 characters:"); for(i= ...
分类:
其他好文 时间:
2019-03-23 10:25:12
阅读次数:
191
1)查看播放音频设备输入 输入 输出 通过如上命令可以得到可用于播放声音的设备,比如card x device x2)播放音频输入 输出 直接输入aplay test.wav 就可以播放wav音频文件了,不需要指定太多的参数,因为wav文件的头部会保存一些声音格式信息,比如pcm格式 ,采样率,ch ...
分类:
其他好文 时间:
2019-03-22 19:04:55
阅读次数:
758
#include <stdio.h>int main(){ int word,num=0; char ch; printf("input your text:\n"); while((ch=getchar())!='\n') if(ch==' ') word=0; else if(word==0){ ...
分类:
其他好文 时间:
2019-03-22 00:42:27
阅读次数:
96