Skip to content

TheGoodFella/par

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

par

Console calculator

#How to use it call the exe from command line with this syntax: <exe name> <number><operation symbol (* , + , /)><number> no spaces between numbers and operator (2*3 --> OK , 2 * 3 --> NO!)

type <exe name> --help for the list of available operations

#How to use par.dll

  1. Import par.dll library to your C# project;
  using par;
  1. Create an instance of the class Par and pass the args[] to the constructor
  Par p = new Par(args);
  1. Call the instance method ManageCmd() that returns the output string.
  Console.Write(p.ManageCmd());

#Examples: 1: INPUT:

>name.exe 8*8 -ores 9+9 -sumall 2+20 -ores 1+2 2^3

OUTPUT:

8*8=64
18
2+20=22
3
2^3=8
22+3+8=33

2: INPUT:

>name.exe -ores 8*8 5/9

OUTPUT:

64
5/9=0,555555555555556

>Pay attention:This program doesn't have code for check the correct input format (any crashes may be due to a number format parsing error)

About

Console calculator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages