六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 38|回复: 0

简单c文件

[复制链接]

升级  76%

10

主题

10

主题

10

主题

童生

Rank: 1

积分
38
 楼主| 发表于 2013-2-7 03:36:39 | 显示全部楼层 |阅读模式
#pragma once
#define WIN32_LEAN_AND_MEAN  // 从 Windows 头中排除极少使用的资料
#include <stdio.h>
#include <tchar.h>
#include <vector>
#include <iostream>
using namespace std;
//#include "test.h" 将包含信息写在头文件中时,只包含此文件
int _tmain(int argc, _TCHAR* argv[])
{
  int   i;
  int a,b;
  printf("These   are   the   %d   command-line   arguments   passed   to   \main:\n\n",   argc);  
  for(i=0;   i<=argc;   i++)  
  printf("argv[%d]:%s\n",   i,   argv);  
  printf("\nThe   environment   string(s)on   this   system   are:   \\n\n");  
  for(i=0;   argv!=NULL;   i++)  
  printf("   argv[%d]:%s\n",   i,   argv);    
  scanf("%d,%d",&a,&b);
  int m[50],count,max=0; 
  printf("您要输入几个数?: "); 
  scanf("%d",&count); 
  for(int i=0;i<count;i++) 
  {  printf("输入一个数: "); 
  scanf("%d",&m); 
  if(m==-1)  
   break;  
  if(m>m[max]) 
   max=i; 
  } 
  printf("最大数为: %d\n\n",m[max]);
 return 0;
}
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表