Does anyone know a console program runnable from DOS that prompts user to input length/width of rectangle then prints rectangles area/perimeter ?

In HTML? No. JavaScript is a web-client language, so has no access to the DOS console. I think you're in the wrong forum... and frankly, I have no idea what forum your request would go in.

In HTML? No. JavaScript is a web-client language, so has no access to the DOS console. I think you're in the wrong forum... and frankly, I have no idea what forum your request would go in.

I meant to say executable from the ms-dos prompt. If that still is impossible then a HTML solution would be great.

It isn't impossible. It's just impossible using the web. HTML cannot execute a DOS program. HTML cannot execute anything; it's interpreted by a browser.

Yes, this question belongs in Software development -- IF you are trying to develop the code yourself. If not, just use a calculator.

console program written in 20 seconds. obviously you need to install ruby (unless you using linux or mac on which its already installed)

#!/usr/bin/ruby

puts "Width :"
w = gets.chomp.to_i

puts "Length : "
l = gets.chomp.to_i

p = (w*2)+(l*2)
a = w*l

puts "Perimeter = #{p.to_s}"
puts "Area = #{a.to_s}"

The point isn't whether a console application can be written. Please read the original question: how to start a DOS prompt and run an executable. Obviously this is impossible from HTML, and any non-DOS system. Can we please stop posting in this off-topic thread and let it die a natural death?

Does anyone know a console program runnable from DOS that prompts user to input length/width of rectangle then prints rectangles area/perimeter ?

That was the original question, which I answered.

I have no clue why he is posting under web development.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.