TA贡献1827条经验 获得超4个赞
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdio.h>
int mabs(int a, int *p)
int
mabs(int
a, int
*p)
{
if(!p)return -1;
if(!p)return
-1;
if(a>0)*p=a;
else *p=-a;
else
*p=-a;
return 0;
return
0;
}
int main()
main()
int a, b;
a, b;
scanf("%d", &a);
mabs(a, &b);
printf("%d\n", b);
TA贡献1796条经验 获得超4个赞
int f (int a, int b){return 0;}int (*Test ()) (int, int){return f;}
TA贡献2016条经验 获得超9个赞
#include<iostream>
#include<cmath>
using namespace std;
{int i,n;
cin>>n;
cout<<abs(n)<<endl;
举报