|
|
#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;
} |
|