Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 28-05-2015
anonymous anonymous is offline
Miembro
NULL
 
Registrado: may 2015
Posts: 23
Poder: 0
anonymous Va por buen camino
ESTE ES MI CODIGO POR LAS DUDAS NO SE SI ESTA ALGO BIEN O MAL
Código Delphi [-]
unit JEBUS;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  TForm3 = class(TForm)
    BitBtn1: TBitBtn;
    Edit1: TEdit;
    Memo1: TMemo;
    Label1: TLabel;
    EdNom: TEdit;
    Label2: TLabel;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.BitBtn1Click(Sender: TObject);
Var i, cant ,cant1,cont,cont1,suma,suma1,resultado,sumav,sumac: Integer;
    nom, linea,linea1,linea2,linea3,linea4: string;
begin
   Memo1.Visible:=true;
   nom := EdNom.Text;
   linea := '';
   cant := 0;
   for i:=1 to length(nom) do
      if nom[i] in ['A','E','I','O','U','a','e','i','o','u'] then begin
         linea := linea + nom[i] +' ';
         cant := cant + 1;
      end;
      case  nom [i] of
      'A':cont:=1;
      'E':cont:=5;
      'I':cont:=9;
      'O':cont:=6;
      'U':cont:=3;
      end;

   Memo1.clear;
   Memo1.Lines.add('Su nombre contiene las vocales');
   Memo1.Lines.Add(linea);
   Memo1.Lines.Add('Total de vocales= '+ IntToStr(Cant));

   linea := '';
   cont1:= 0;
   for i := 1 to length (nom) do
   if nom [i] in ['B','C','D','F','G','H','J','K','L','M','Ñ','O','P','Q','R','S','T','V','W','X','Y','Z','b','c','d',  'f','g','h','j','k','l','m','n','ñ','p','q','r','s','t','v','w','x','y','z'] then
   begin
     linea1 := linea1 + nom[i] +' ';
         cant1 := cant1 + 1;
   case nom [i]  of
   'J','S':cont1:= 1;
   'B','K','T':cont1:= 2;
    'C','L':cont1:=3;
     'D','M','V':cont1:= 4;
      'N','W':cont1:=5;
       'F','X':cont1:=6;
        'G','P','Y':cont1:=7;
         'H','Q','Z':cont1:=8;
          'R':cont1:=9;
   end;
     end;
     linea4:=linea4+inttostr(cont)+' ';
     linea3:=linea3+nom[i]+' ';
     cant1:=cant1+1;

   Memo1.Lines.add('-------------------------------- ');
   Memo1.Lines.add('Cantidad de Consonantes');
   Memo1.Lines.Add(linea1);
    Memo1.Lines.Add('Total de Consonantes= '+ IntToStr(Cant1));

  linea := '';
   cant := 0;
   for i:=1 to length(nom) do
   begin
      if nom[i] in ['A','E','I','O','U','a','e','i','o','u'] then
       begin
         linea := linea + nom[i] +' ';
         cant := cant + 1;


   begin

   if nom [i] in ['A'] then
      sumav:=sumav+1;
    if nom [i] in ['E'] then
      sumav:=sumav+5;
     if nom [i] in ['I'] then
        sumav:=sumav+9;
        if nom [i] in ['O'] then
            sumav:=sumav+6;
          if nom [i] in ['U'] then
               sumav:=sumav+3;


   end;
       end;
   end;


   Memo1.Lines.add('-------------------------------- ');
   Memo1.Lines.Add('ESENCIA (lo que usted Quiere)');
   Memo1.Lines.Add(linea);
   Memo1.Lines.Add(inttostr(sumav));

   Memo1.Lines.add('-------------------------------- ');
   Memo1.Lines.Add('IMAGEN (como lo ven los demas)');
   Memo1.Lines.Add(linea);
   Memo1.Lines.Add(inttostr(cont1));

end;

end.

Última edición por nlsgarcia fecha: 28-05-2015 a las 22:14:51. Razón: Sintaxis Delphi
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
sumar numeros y separar enteros y fracciones edgar_prospero Varios 5 26-01-2015 05:47:33
sumar dos números y ver resultado con un boton kike22 Varios 2 26-09-2010 19:13:58
Leer fichero texto palabra por palabra... Lester Varios 2 03-04-2007 15:28:27
Leer palabra por palabra en Word solecito Servers 0 12-03-2007 20:58:13
Evitar perder valores asignados en el constructor de un objeto dec Trucos 0 30-06-2006 13:37:55


La franja horaria es GMT +2. Ahora son las 15:35:32.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi