Find Jobs
Hire Freelancers

Canada Customs Transaction

$30-250 USD

Cerrado
Publicado hace más de 15 años

$30-250 USD

Pagado a la entrega
I programmed this for PHP, but now it seems we need an offline version, which I would prefer in C, as it is extremely simple, yet I cannot program in C. it would be console (dos) based, and requesting an input for only $trail, $security being 12963. the security # is not really a security number like you would think, it's just a reference number for our systems. my php code is as follows: <? /***************************************************** Filename: [login to view URL] Function: Generate check digit number for Canada Customs transaction numbers Writer: Ryan Forsyth Date: 06/27/06 *****************************************************/ Function Transaction($security="", $trail="", $reference="") { //Turn sections into 13 digit reference Number $transaction = $security.$trail.$reference; //Split transaction into seperate digits in an array $split = preg_split('//', $transaction, -1, PREG_SPLIT_NO_EMPTY); //Starting value for check digit $sum = 0; //Used to ensure calculation is even/odd/even/etc $multiplier = 0; //Start checking in array for values foreach ($split as $value) { //If multiplier is an even number, do this if(($multiplier - (2 * floor($multiplier/2))) == 0) { //multiply by 1 to get the even sum $numb = ($value * 1); //Check to make sure number is 10 or under. If over, add the first digit //to the second digit until end number is single digit while($numb >= 10) { $split_numb = preg_split('//', $numb, -1, PREG_SPLIT_NO_EMPTY); $numb = ($split_numb[0] + $split_numb[1]); } //add value to sum $sum = $numb + $sum; } //If multiplier is an odd number, do this else { //multiply by 2 to get the odd sum $numb = ($value * 2); //Check to make sure number is 10 or under. If over, add the first digit //to the second digit until end number is single digit while($numb >= 10) { $split_numb = preg_split('//', $numb, -1, PREG_SPLIT_NO_EMPTY); $numb = ($split_numb[0] + $split_numb[1]); } //add value to sum $sum = $numb + $sum; } //Add 1 to multiplier to switch between even and odd $multiplier++; } //Divide sum by 10 to get a quotient and a remainder $sum = $sum/10; //Split quotient and remainder into an array $sum = explode(".", $sum); //Output the remainder as check digit for the reference number return $sum[1]; } ?>
ID del proyecto: 340809

Información sobre el proyecto

16 propuestas
Proyecto remoto
Activo hace 15 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
16 freelancers están ofertando un promedio de $90 USD por este trabajo
Avatar del usuario
Hello, I am an experienced, Ontario-based C programmer. I can port your code into C easily. The only additional information I would need from you would be a set of 5 numbers and associated checksums so that the module could be tested.
$60 USD en 2 días
5,0 (1 comentario)
2,7
2,7
Avatar del usuario
I to do this now!
$100 USD en 0 día
5,0 (1 comentario)
2,5
2,5
Avatar del usuario
it is very simple task. It takes only 1 hour from me.
$30 USD en 0 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
i am interested
$200 USD en 15 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
hi I'am a C/C++ coder,I use php and C++ both.
$40 USD en 0 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
i'm interested
$50 USD en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
pls see the pm.
$30 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Ready to start.
$30 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
having good know ledge in c ready to start the work
$80 USD en 5 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
I will do it with all quality tests required
$200 USD en 4 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Pelase see my PM
$230 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
i can do this
$100 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
It can be done without problems, and very quickly in c++.
$80 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
can you send me samples of your input data? Appreciate. Could you tell whether multithread can be used? Thanks
$30 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Hello, I am experienced c/c++ developer, and I can do this task with high quality. (see my PM)
$30 USD en 0 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
hi my team is expert in c/c++ so your work will be done professionals the work can be completed in less days if you say your work will be done in a priority way looking forward for the work regards team weboweb
$150 USD en 3 días
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de CANADA
Winnipeg, Canada
0,0
0
Miembro desde nov 9, 2008

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.