4 Replies - 926 Views - Last Post: 04 April 2012 - 03:32 PM Rate Topic: -----

#1 Milestone45  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 18
  • Joined: 04-April 12

Help with Batch Script

Posted 04 April 2012 - 04:34 AM

The assignment require me to create a programme that handles various mathematical calculations like (Area, Volume,Arithmatic calculator, And peerimeter calculator on a Notepad
the futherst i went was:
@echo off
:: calculator
:start
cls
set /p math=Equation:
set /p math1=choose operator [+/*]:
set /a math2=%math%
echo %math%=%math2%
pause ulv
goto start


thank you!

This post has been edited by Atli: 04 April 2012 - 04:54 AM
Reason for edit:: Added [code]...[/code] tags.

Is This A Good Question/Topic? 0
  • +

Replies To: Help with Batch Script

#2 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3712
  • View blog
  • Posts: 5,964
  • Joined: 08-June 10

Re: Help with Batch Script

Posted 04 April 2012 - 04:59 AM

* Moved to the Other Languges forum *

You say you are a "java beginner", however what you posted looks like a Windows batch script.
Was This Post Helpful? 1
  • +
  • -

#3 Milestone45  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 18
  • Joined: 04-April 12

Re: Help with Batch Script

Posted 04 April 2012 - 05:14 AM

the programme is required to run on Command Prompt.
Was This Post Helpful? 0
  • +
  • -

#4 Ryano121  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 1362
  • Posts: 3,002
  • Joined: 30-January 11

Re: Help with Batch Script

Posted 04 April 2012 - 05:43 AM

Yes but the code you posted is Batch script and not Java.
Was This Post Helpful? 1
  • +
  • -

#5 GunnerInc  Icon User is online

  • "Hurry up and wait"
  • member icon




Reputation: 858
  • View blog
  • Posts: 2,277
  • Joined: 28-March 11

Re: Help with Batch Script

Posted 04 April 2012 - 03:32 PM

Edited the topic title to reflect the fact you need help with a Batch Script.

So, what is your problem? Seems to run fine for me. As we won't just write the code for you, how do you think you should proceed to add the other operations?

This post has been edited by GunnerInc: 04 April 2012 - 03:33 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1