Hello,
I have a Perl code which I am having problems to translate to VB.NET.
Could someone tell me what would be the VB.NET equivalent or an online
Perl VB.NET converter?
This is the Perl code:
#!/usr/bin/perl
#
# wh, 2007-June
use integer;
print "\nenter your max ==";
chomp($n=<>);
print "enter the number of columns ==";
chomp($c=<>);
($c 0) or die "You must be kidding!\n\n";
$h = $n/$c; $rm = $n%$c;
print "\n";
for $row (1..$h)
{ for ($s=0,$i=$row; $s<$c; $i+=($h+($s<$rm )), ++$s)
{ printf "%7u", $i }
print "\n";
}
++$h;
for ($s=0,$i=$h; $s < $rm; $i+=$h, ++$s)
{ printf "%7u", $i }
print "\n\n"
### end ###
Thanks,
Miguel
I have a Perl code which I am having problems to translate to VB.NET.
Could someone tell me what would be the VB.NET equivalent or an online
Perl VB.NET converter?
This is the Perl code:
#!/usr/bin/perl
#
# wh, 2007-June
use integer;
print "\nenter your max ==";
chomp($n=<>);
print "enter the number of columns ==";
chomp($c=<>);
($c 0) or die "You must be kidding!\n\n";
$h = $n/$c; $rm = $n%$c;
print "\n";
for $row (1..$h)
{ for ($s=0,$i=$row; $s<$c; $i+=($h+($s<$rm )), ++$s)
{ printf "%7u", $i }
print "\n";
}
++$h;
for ($s=0,$i=$h; $s < $rm; $i+=$h, ++$s)
{ printf "%7u", $i }
print "\n\n"
### end ###
Thanks,
Miguel