FIBONACCI
PROGRAMA
unit Fibo;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Numero: TEdit;
calcular: TButton;
Serie: TLabel;
FIBO: TLabel;
procedure calcularClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure [Link](Sender: TObject);
Var
N,K:Byte ;
A,B,C:Int64;
begin
N:=StrToInt([Link]);
If (N=1) Or (N=2) Then
[Link] :='el termino es el numero: 1 ';
If (N>2) And (N<21) Then
Begin
A:=1;
B:=1;
K:=2;
Repeat
C:=A+B;
K:=K+1;
A:=B;
B:=C;
Until K=N;
[Link]:='El Termino que corresponde a la posicion indicada es:'+ IntToStr(C);
end;
If N>20 Then
[Link]:='No se Puede Presentar el termino ';
[Link]:=True;
end;
end.
PROGRAMA
SUMATORIA Y MULTIPLICACION
unit SUMA;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
Label4: TLabel;
calcular: TButton;
Label5: TLabel;
Edit2: TEdit;
procedure calcularClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure [Link](Sender: TObject);
Var
N,SP,PI,A,K:Integer;
Begin
N:=StrtoInt([Link]);
SP:=0;
PI:=1;
For K:=0 To N DO
Begin
A:=StrtoInt([Link]);
If A Mod 2=0 then
Sp:= Sp+A;
If A Mod 2 >0 then
PI:=PI*A;
end;
[Link]:='SUMA DE PARES='+InttoStr(Sp);
[Link]:='Producto de impares='+ InttoStr(PI);
end;
end.
FCyT – UMSS
DEPTO. FÍSICA
LAB. FÍSICA BÁSICA II
PRÁCTICA #2
CONSTANTE ELÁSTICA DE UN
RESORTE
Docente: Lic. Marco Viscarra V.
Alumnos: Andia Navarrete Isabel
Calvo Salazar Pablo Andrés
Grupo: Lunes 11:15 – 12:45
Fecha de Entrega: 02/10/2017
PRACTICA
Nombre: Carla Calvo Salazar
Carrera: Ing. Alimentos
01/10/2017