outputs annser in rational form and computes the close rational approximatation to e which is 2.17 where e==1+1/1!+1/2!+1/3!+1/4!+...... answer should be in form of a/b
2006-10-19
21:46:58
·
4 answers
·
asked by
Jessie N
1
in
Computers & Internet
➔ Programming & Design
rational form and computes e where is the sum of 1+1/1!+1/2!+1/3!+1/4!+1/5! ... and result is aproximated using 2.17 using struc Rational {int a, int b} to represent a/b
new structure typedef struct Rational Rational; and declare Rationa to sruct Rational. using operations of addition and multiplication. how do i implement these in the program Rational R_init(int a, int b); Rational R_add (rational x, Rational Y); Rational R_mult(Rational x, Rational Y); int R_show (Rational x ); R_init should return a rational representation for a/b, R_add should add two rational arguments it is passed and R_show should print our the rational number (a/b)
2006-10-19
22:44:12 ·
update #1