#include<stdio.h>//从键盘输入两个整数 ,调用库函数 计算两个数之差的绝对值//带符号相减intSBB(int a,int b){int S =0;
S = a - b;if(S <0){return S *(-1);}return S;}intmain(){int a =0, b =0,c=0;scanf("%d %d",&a,&b);
c =SBB(a, b);printf("%d", c);}
程序:#include <stdio.h>//从键盘输入两个整数 ,调用库函数 计算两个数之差的绝对值//带符号相减int SBB(int a,int b) { int S = 0; S = a - b; if (S < 0) { return S * (-1); } return S;}int main(){ int a = 0, b = 0,c=0; scanf("%d %d", &a, &b); c = SBB(a, b);