7-36 复数四则运算 (15分)
强行过检测点哈哈哈哈哈 但是整数还是不知道为什么过不了 # include <stdio.h> //要考虑当值小于0.1或者大于-0.1时,该值为0 void pack ( double a1 , double b1 , double a2 , double b2 , char c , double s_num , double v_num ) ; void print_add ( double a1 , double b1 , double a2 , double b2 ) { char c = '+' ; double s_num , v_num ; s_num = a1 + a2 ; v_num = b1 + b2 ; pack ( a1 , b1 , a2 , b2 , c , s_num , v_num ) ; } void print_div ( double a1 , double b1 , double a2 , double b2 ) { char c = '-' ; double s_num , v_num ; s_num = a1 - a2 ; v_num = b1 - b2 ; pack ( a1 , b1 , a2 , b2 , c , s_num , v_num ) ; } void print_mult ( double a1 , double b1