码迷,mamicode.com
首页 >  
搜索关键字:cin    ( 7874个结果
原 poj 2677:肿瘤检测
描述一张CT扫描的灰度图像可以用一个N*N(0 2 using namespace std; 3 4 int main() { 5 int N; 6 int size = 0, circle = 0; 7 int i, j; 8 cin >> N; 9 ...
分类:其他好文   时间:2015-02-15 20:37:16    阅读次数:218
C++“输入输出流与文件系统”
I/O流的概念 一、流     1、含义:流是一个处于传输状态的字节序列,是字节在对象之间的“流动”,流的操作包括输入与输出。     2、作用:提供了灵活而易于使用的输入、输出机制,输入输出是数据传送的过程,数据如流水一样从一个位置流向另一个位置。 二、常用的流     1、cin为标准输入流对象,与提取运算符>>连用,用于输入。     2、cout为标准输出流对象,与...
分类:编程语言   时间:2015-02-13 16:38:38    阅读次数:163
c++primer学习笔记chapter1~4
2015.2.13 1. cout cin 分别是istream osteam 类的一个对象,他们被写在文件iostream.h文件中; 2....
分类:编程语言   时间:2015-02-13 16:37:35    阅读次数:198
getline
getline读取整行文本”。书上给的程序如下:int main(){ string line: while(getline(cin,line)) cout<<line<<endl; return 0;}
分类:其他好文   时间:2015-02-13 11:21:28    阅读次数:100
如何在VC6.0里存储带空格的字符串
charstr[20];cin.getline(str,20)或stringstr;getline(cin,str);据说都可以存储含空格字符串,但我用VC6.0时都出错以下为粘贴关于在C++中输入带空格的字符串的方法yibcs2012-08-1020:44:17此人文章#include <iostream>#include<stdio.h>#include <string>usi..
分类:其他好文   时间:2015-02-10 15:32:31    阅读次数:156
POJ-3253 Fence Repair
AC代码如下: #include #include #include #include using namespace std; const int maxn=201314; int main() { int n,a[maxn]; while(cin>>n) { for(int i=0;i>a[i]; ...
分类:其他好文   时间:2015-02-09 20:21:01    阅读次数:102
poj3617(字典序最小问题)
#include #include #include using namespace std; int n,m; char S[2100],P[2100]; int main() { #ifdef xxz freopen("in.txt","r",stdin); #endif // xxz ios::sync_with_stdio(false); cin.tie(0...
分类:其他好文   时间:2015-02-09 18:20:33    阅读次数:138
动态规划 最长公共子序列 王子和公主 Prince and Princess UVa 10635
#include #include using namespace std; const int maxn = 250 * 250; int main(){ char T; cin >> T; for (char k = 0; k > n >> p >> q; int num[maxn]; memset(n...
分类:其他好文   时间:2015-02-09 00:51:08    阅读次数:193
C++ Primer Plus 6th 读书笔记 - 第6章 分支语句和逻辑运算符
1. cin读取错误时对换行符的处理 1 #include 2 3 using namespace std; 4 5 int main() { 6 double d; 7 char c; 8 cin >> d; 9 if(!cin) {10 co...
分类:编程语言   时间:2015-02-08 23:08:14    阅读次数:182
寒假练习 01
这一系列的练习主要在Virtual Judge上进行,题目为小白书上的题目推荐。UVa 10055注意两个数的大小关系,水题。#include using namespace std;int main(){ long long x, y; while(cin >> x >> y) { if(x >....
分类:其他好文   时间:2015-02-06 18:36:33    阅读次数:176
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!