error C2059: 语法错误:"?"是什么意思 5
1个回答
展开全部
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
int max(int a, int b)
{
if (a > b)
return a;
else
return b;
}
int _tmain(int argc, _TCHAR* argv[])
{
int i, j, k;
int p1[10] = { 10,23, 41, 4,5, 100,91, 6, 11, 52 };
for (i = 0; i <10; i++)
{
for (j = 0; j < 10; j++)
{
if (p1[i] >= p1[j])
{
int t = p1[i];
p1[i] = p1[j];
p1[j] = t;
}
/*k = max(p1[i], p1[j]);
printf("%d ", k);*/
}
}
for (i = 0; i < 10; i++)
{
printf("%d ", p1[i]);
}
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int max(int a, int b)
{
if (a > b)
return a;
else
return b;
}
int _tmain(int argc, _TCHAR* argv[])
{
int i, j, k;
int p1[10] = { 10,23, 41, 4,5, 100,91, 6, 11, 52 };
for (i = 0; i <10; i++)
{
for (j = 0; j < 10; j++)
{
if (p1[i] >= p1[j])
{
int t = p1[i];
p1[i] = p1[j];
p1[j] = t;
}
/*k = max(p1[i], p1[j]);
printf("%d ", k);*/
}
}
for (i = 0; i < 10; i++)
{
printf("%d ", p1[i]);
}
system("pause");
return 0;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询