Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1567868
  • 博文数量: 354
  • 博客积分: 8137
  • 博客等级: 中将
  • 技术积分: 5137
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-26 15:40
文章分类

全部博文(354)

文章存档

2010年(300)

2009年(54)

分类: C/C++

2010-06-24 06:05:55

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
int main(int argc, char *argv[])
{
    int disp, count;
    if(argc < 2){
        printf("You must enter the length of the count\n");
        printf("on the command line.Try again\n");
        exit(1);
    }

    if(argc == 3 && !strcmp(argv[2], "display"))
        disp = 1;
    else
        disp = 0;
    for(count = atoi(argv[1]); count; --count)
        if(disp)
        printf("%d\n", count);

    putchar('\a');
    printf("Down");
    system("pause");
    return 0;
}


阅读(437) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~