Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Program ex5;
- Uses Wincrt;
- Var
- n,i: Integer;
- s: Real;
- Function puis (a,b:Integer): Integer;
- Var
- i,s: Integer;
- Begin
- s := 1;
- For i:=1 To b Do
- s := s*a;
- puis := s;
- End;
- Begin
- Repeat
- Writeln ('Donner un entier positif') ;
- Readln (n) ;
- Until n>0 ;
- s := 0;
- For i:=1 To n Do
- s := s+((2*i-1)/puis(i,i));
- Writeln (s);
- End.
Add Comment
Please, Sign In to add comment