no tenia nada que hacer, encerio, y me puse hacer calculadoras en varios idiomas....
$a = $argv[1];
/*
* Ejecucion :
*
* php calculadora.php 5
*
* */
$a = $argv[1];
for ($i=1; $i<=10; $i++)
{
echo $a," x ", $i, " = ", $a*$i, "\n";
}
// JavaScript
var a,b=1;
a = prompt('Numero??','');
while (b <= 10) {
document.write(a+' x '+b+' = '+ a*b+'
');
b++;
}
#!/usr/bib/perl
$a = $ARGV[0] ;
for ($b=1; $b<=10; $b++) {
print "$b x $a\t=\t",$b*$a,"\n";
}
#!/usr/bin/python
import sys
b = sys.argv[1]
for a in range(1,11):
print a," x ",b," = ",(int(a) * int(b))
#include
#include
main()
{
int a,b;
printf("Dame la tabla: ");
scanf("%d", &a);
for (b=1; b<=10; b++)
{
printf("%i x %i = %d\n",a,b,a*b);
}
}