Ver Mensaje Individual
  #10  
Antiguo 15-07-2015
Avatar de BDWONG
BDWONG BDWONG is offline
Miembro
NULL
 
Registrado: nov 2013
Posts: 113
Reputación: 11
BDWONG Va por buen camino
Smile Hola

Espero esto sea lo que buscas

Código Delphi [-]
function insertCharacter(number:integer):string;
var
str:string;
begin
   str:=inttostr(number);
   if length(str)>2 then Insert(',',str,length(str)-1);

   Result:=str;
end;

var
numero:integer;
begin

 writeln(insertCharacter(123456));
 writeln(insertCharacter(123));
 writeln(insertCharacter(1));
 writeln(insertCharacter(123456789));
 readln;

end.

Saludos..


edito:changos eficsia me gano XD

Última edición por BDWONG fecha: 15-07-2015 a las 01:10:32.
Responder Con Cita