Write One Full Program with Function to Implement Following in c++ : sgn(x) : return sign of number (positive = 1 , negative = -1 , zero = 0) 1- Function (fnsgn1) sign1 using by Ref method 2- Function...


Write One Full Program with Function to Implement Following in c++ :


sgn(x) : return sign of number (positive = 1 , negative = -1 , zero = 0)




1- Function (fnsgn1) sign1 using by Ref method

2- Function (fnsgn2) sign2 using by Val method


Procedure (main):
1 - test program with m= (-9)
2 - call (fnsgn1) for m and store in v1
3 - call (fnsgn2) for m and store in v2
4 - sum v1 and v2
5 - if sum not equal to -2 then print (error) otherwise print (ok)



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here