zoukankan      html  css  js  c++  java
  • UnixC 一个非常简单的文本编辑器

    #include "Head.c"
    #define MAX 100
    #define LEN 10

    char text[MAX][LEN];              /*一个非常简单的文本编辑器*/

    void main()
    {
            register int t,i,j;             /*声明为寄存器变量*/
            for(t=0; t < MAX ; t++)   /*逐行输入字符串* /
            {
                    printf("%d:",t);
                    gets(text[t]);        /*记录输入的值。*/
                    if( !text[t][0])       /*如果是空值返回*/
                    {
                            break;
                    }//End if;
            }//End for;

            for( i = 0 ; i < t ; i++)     /*按行,逐个字符输出字符串*/
            {
                    for( j = 0 ; text[i][j] ; j++)
                    {
                            putchar(text[i][j]);
                    }//End for;
                    putchar('/n');
            }//End for;
    }//End main();
    ---------------------------------------------------------------------------
    Head.c中的代码
    #include<string.h>
    #include<stdio.h>
    #include<math.h>
    #include<ctype.h>       //函数库 toupper;
    #include<stdlib.h>      //Exit(0) 函数库;

  • 相关阅读:
    exchangeNetwork
    VRP OS Management
    filleSystemBasises
    Study_way
    1.MySQL 安装
    7.进程池与线程池
    6.线程
    5.进程 -锁
    4.进程-1
    3.多线程TCP协议与加密方式
  • 原文地址:https://www.cnblogs.com/xiaotuni/p/2365721.html
Copyright © 2011-2022 走看看