码迷,mamicode.com
首页 >  
搜索关键字:while if else    ( 50281个结果
Oracle PL/SQL 编程基础 实例 2
if  循环  控制语句  if--then        endif if----then ----else   endif if-----then --elsif then ----else     endif --编写一个过程,可以 输入一个雇员名,如果该雇员的工资低于2000就给他增加10%     create   or replace proc...
分类:数据库   时间:2014-05-13 00:23:11    阅读次数:436
C语言文件操作(一)
实例1:读写字符文件,每次读取一个字符。#include<stdio.h>#include<stdlib.h>intmain(){FILE*fpin;FILE*fpout;charc;fpout=fopen("c:\\dest.txt","wt");if((fpin=fopen("c:\\test.txt","rt"))!=NULL){c=fgetc(fpin);while(c!=EOF){fputc(c,fpout);c=fgetc(fpin);..
分类:编程语言   时间:2014-05-12 03:57:13    阅读次数:238
C语言文件操作(二)
实例2:读取字符文件,每次读入一个缓存里面。#include<stdio.h>#include<stdlib.h>#defineMAXLEN1024intmain(){FILE*fin;FILE*fout=fopen("c:\\dest.txt","wt");charbuf[MAXLEN];if((fin=fopen("c:\\test.txt","rt"))!=NULL){char*c=fgets(buf,MAXLEN,fin);while(..
分类:编程语言   时间:2014-05-12 02:57:48    阅读次数:251
一个功能更强大的函数,也是用正则表达式写的
Option Explicit Function stripHTML(strtext)  dim arysplit,i,j, strOutput  arysplit=split(strtext," if len(arysplit(0))>0 then j=1 else j=0 for i=j to ubound(arysplit)  if instr(arysplit(i),">") ...
分类:其他好文   时间:2014-05-11 21:56:06    阅读次数:355
九度 1351 只出现一次的数
#include #include using namespace std; #ifdef ONLINE_JUDGE #define FINPUT(file) 0 #define FOUTPUT(file) 0 #else #...
分类:其他好文   时间:2014-05-11 20:36:05    阅读次数:337
九度 1201
#include #include using namespace std; #ifdef ONLINE_JUDGE #define FINPUT(file) 0 #define FOUTPUT(file) 0 #else ...
分类:其他好文   时间:2014-05-11 20:30:57    阅读次数:308
UVa 673 括号平衡
思路:简单的匹配操作,利用栈。 Code: #include #include char stack[135]; int main() { int n; scanf("%d",&n); getchar(); while(n-->0) { memset(stack,0,sizeof(stack)); char c; int top=0; int flag=1;...
分类:其他好文   时间:2014-05-11 20:19:34    阅读次数:376
九度 1205
#include #include using namespace std; #ifdef ONLINE_JUDGE #define FINPUT(file) 0 #define FOUTPUT(file) 0 #else ...
分类:其他好文   时间:2014-05-11 18:36:16    阅读次数:245
九度 1203
#include #include using namespace std; #ifdef ONLINE_JUDGE #define FINPUT(file) 0 #define FOUTPUT(file) 0 #else ...
分类:其他好文   时间:2014-05-11 18:33:34    阅读次数:246
使用while语句修改后的效果和for一样
while循环语句我们使用while修改之前Demo10的跑1000米的程序哈:使用while语句修改后的效果和for一样哈。那我们怎么样知道什么时候用for循环,什么时候用while循环呢?当明确知道要循环的次数的时候,就使用for循环当不确定循环次数,只知道循环结束条件时,可以使用while循环...
分类:其他好文   时间:2014-05-11 17:33:51    阅读次数:297
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!