c语言中利用函数同时返回两个数的和与差
c语⾔中利⽤函数同时返回两个数的和与差c语⾔中利⽤函数同时返回两个数的和与差。1、#include <stdio.h>void sum_diff(int n1, int n2, int sum, int diff){sum = n1 + n2;记住我diff = (n1 > n2) ? (n1 - n2) : (n2 - n1);}int main(void){int na, n...
2024-01-05 33 0
c语⾔中利⽤函数同时返回两个数的和与差c语⾔中利⽤函数同时返回两个数的和与差。1、#include <stdio.h>void sum_diff(int n1, int n2, int sum, int diff){sum = n1 + n2;记住我diff = (n1 > n2) ? (n1 - n2) : (n2 - n1);}int main(void){int na, n...