Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

There is no built-in tools in pascal for handling fractions, although you can make it yourself.

In order to make it, you should declare a new type like this:

type

TFraction = record

num,den:longint

end;

and you should write some functions for common operators, such as addition of two fractions or addition of an integer and a fraction and so on (only write those which are necessary). some headers are:

procedure addtwofrac

(f1,f2:TFraction;

var res:TFraction);

procedure addinttofrac(i:integer;

f:TFraction;

var res:TFraction);

and be carefull. You should write your functions as efficient as possible; because in working with fractions, numerator and denomerator grow very fast and may overflow from a longint variable. As a simple solution to this problem you can frequently divide 'num' and 'den' to 'gcd(num,den)'----(gcd ::= greatest common divisor).

AND ABOUT the 2'nd question.

you can use at least two method to solve this problem:

First Method: you can do two operation(one summation and one subtraction) in the body of the loop.

Second Method: you can declare a simple variable, such as Mult, initiated to 1, and place a

Mult := Mult * -1;

in the body of the loop and then use Mult with the terms of that seri:

Sum := Sum + Mult * Term;

I am not so good in english writing. I hope my answer will be usefull for you.

Please give some points to me. :)