码迷,mamicode.com
首页 >  
搜索关键字:eof    ( 7139个结果
关于C++ 的eof
#include#include#define MAXSIZE 1000using namespace std;int main(){ int a[MAXSIZE]; ifstream fin("input.txt"); if( !fin.is_open() ) { ...
分类:编程语言   时间:2015-04-27 00:20:06    阅读次数:267
csu 1577: Dice Game
#include #include #include using namespace std; double sumg,sume; int ga1,gb1,ga2,gb2,ea1,eb1,ea2,eb2; int main () { while (scanf("%d%d%d%d",&ga1,&gb1,&ga2,&gb2)!=EOF) { ...
分类:其他好文   时间:2015-04-26 18:21:09    阅读次数:124
迭代法求平方根
求n的平方根,先假设一猜测值X0 = 1,然后根据以下公式求出X1,再将X1代入公式右边,继续求出X2…通过有效次迭代后即可求出n的平方根,Xk+1#include #include int main(){ double x,y,a; while(scanf("%lf",&a)!=EOF) { x....
分类:其他好文   时间:2015-04-26 15:08:50    阅读次数:195
getcin_to_putcout.c
#include #include int main(void) { int c; while((c = getc(stdin)) != EOF) if(putc(c,stdout) == EOF){ printf("output error\n"); exit(1); } if(ferror(stdin)) { printf("input error\...
分类:其他好文   时间:2015-04-26 13:57:03    阅读次数:137
shell 下简单菜单脚本
menu.sh菜单界面脚本#!/bin/bash#menu.shfunctionmenu(){cat<<eof#############################################`echo-e"\033[32;40mmenu\033[0m"`#############################################*1)addauser*2)setpasswordforuser*3)deleteauser*4)printdiskspace*5)pr..
分类:系统相关   时间:2015-04-26 01:39:16    阅读次数:234
Android开发 Failed to install *.apk on device 'emulator-5554': EOF
在运行android 程序时出现这样的错误: Failed to install homework.apk on device 'emulator-5554': EOF java.io.IOException: EOF在网上查找资料,问题在于 adb ,可能的原因在于解决方案: 一:打开cmd...
分类:移动开发   时间:2015-04-24 16:04:05    阅读次数:168
大数运算之比较大小
给你两个很大的数,判断大小。#include #include int main(){ char s1[1024], s2[1024]; while(scanf("%s %s", s1, s2) != EOF) { if(s1[0] == '0' && s2[0] =...
分类:其他好文   时间:2015-04-23 22:56:00    阅读次数:150
动态规划:Ignatius and the Princess IV
#include#include#includeint main(){ _int64 n,a; while(scanf("%I64d",&n)!=EOF) { _int64 b=0,c; while(n--) { sc...
分类:其他好文   时间:2015-04-23 21:10:13    阅读次数:152
hdu 分拆素数和
输入一个数后,分别判断和为这个数的两个数是否为素数;#include#include#includeint main(){long n,i,t,k,r,s,j;while(scanf("%ld",&n)!=EOF&&n!=0) //n=0时输出;{s=0;for(i=2;i<n/2;i++){t=1...
分类:其他好文   时间:2015-04-23 19:40:24    阅读次数:111
nyoj528 找球号(三) set容器的应用
set容器的用法  具体可以看我的另外一篇stl的应用http://blog.csdn.net/su20145104009/article/details/44562659 #include #include using namespace std; int main() { int n,x; sets; while(scanf("%d",&n)!=EOF) { for(in...
分类:其他好文   时间:2015-04-23 17:36:36    阅读次数:120
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!