cplusplus.com
这个网页不仅可以查所有c语言的头文件,以及头文件的对应的关键字,还能模拟代码输入输出,可谓是功能齐全。
在附赠一个用库函数求最大最小数以及排序的方法
#include "stdio.h"
void Swap(int x,int y)
{
int temp=0;
temp=x;
x=y;
y=temp;
}
max(int x,int y)
{
int q=0;
if(x>y)
q=x;
else
q=y;
return q;
}
int main()
{
int a=10;
int b=20;
Swap(a,b);
max(a,b);
printf("%d %d\n",a,b);
printf("%d\n",max(a,b));}
以及这个程序的答案
10 20
20
Press any key to continue