forked from palermostest25/Calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCalculator.bat
978 lines (873 loc) · 28.3 KB
/
Calculator.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
@echo off
set 1=%1
if not defined 1 set 2=1
set del=0
cd > tmpfile1
for /f "tokens=*" %%x in (tmpfile1) do (set curcd=%%x)
del tmpfile1
if defined var50 goto defined
if not defined 2 (
set sum=%1% && goto after1
)
:start
set sum=0
set goto=0
title Calculator
cls
echo Welcome to the calculator
echo ==========V 4.5==========
echo PI
echo E
echo Pow
echo Sqrt
echo Square
echo Average
echo Round
echo ABS
echo DUnits for Data units
echo Conv for conversions
set /p sum=Please enter your sum(Type ? for information)-
:after1
echo DUBUG: %sum%
set sum=%sum: =%
set sum=%sum:,=%
call :replaceEqualSign in sum with +
if %sum:~-1%==* set sum=%sum%2
if %sum%==DUnits goto dunits
if %sum%==dunits goto dunits
if %sum%==Dunits goto dunits
if %sum%==dUnits goto dunits
if %sum%==DataUnits goto dunits
if %sum%==dataunits goto dunits
if %sum%==Dataunits goto dunits
if %sum%==dataUnits goto dunits
if %sum%==SquareRoot goto sqrt
if %sum%==Squareroot goto sqrt
if %sum%==squareRoot goto sqrt
if %sum%==squareroot goto sqrt
if %sum%==Sqrt goto sqrt
if %sum%==sqrt goto sqrt
if %sum%==SQRT goto sqrt
if %sum%==Round goto round
if %sum%==round goto round
if %sum%==R goto round
if %sum%==r goto round
if %sum%==ABS goto abs
if %sum%==Abs goto abs
if %sum%==abs goto abs
if %sum%==Absolute goto abs
if %sum%==Absolutevalue goto abs
if %sum%==absolute goto abs
if %sum%==absolutevalue goto abs
if %sum%==ABSOLUTEVALUE goto abs
if %sum%==ABSOLUTEVALUE goto abs
if %sum%==Pow goto pow
if %sum%==pow goto pow
if %sum%==POW goto pow
if %sum%==Power goto pow
if %sum%==power goto pow
if %sum%==POWER goto pow
if %sum%==Conv goto conv
if %sum%==conv goto conv
if %sum%==CONV goto conv
if %sum%==Conversion goto conv
if %sum%==CONVERSION goto conv
if %sum%==conversion goto conv
if %sum%==CONVERSIONS goto conv
if %sum%==Conversions goto conv
if %sum%==conversions goto conv
if %sum%==Square goto square
if %sum%==SQUARE goto square
if %sum%==square goto square
if %sum%==SquareNumber goto square
if %sum%==Squarenumber goto square
if %sum%==squarenumber goto square
if %sum%==squareNumber goto square
set sum=%sum:yourmum=9999999999999999999999999999999999999999999%
if %sum%==forza echo i like forza & pause & goto start
if %sum%==fortza echo thats not how you speel it :( & pause & goto start
if %sum%==trans goto LNG
if %sum%==translate goto LNG
if %sum%==TRANS goto LNG
if %sum%==TRANSLATE goto LNG
if %sum%==LNG goto LNG
if %sum%==Translate goto LNG
if %sum%==Trans goto LNG
if %sum%==Lng goto LNG
if %sum%==lng goto LNG
if %sum%==LNG goto LNG
if %sum%==Lang goto LNG
if %sum%==LANG goto LNG
if %sum%==lang goto LNG
if %sum%==avg goto AVG
if %sum%==AVG goto AVG
if %sum%==Avg goto AVG
if %sum%==Average goto AVG
if %sum%==AVERAGE goto AVG
if %sum%==average goto AVG
if %sum%==Square goto square
if %sum%==SQUARE goto square
if %sum%==square goto square
if %sum%==exit exit
if %sum%==Exit exit
if %sum%==EXIT exit
if %sum%==cmd cmd
if %sum%==Cmd cmd
if %sum%==CMD cmd
if %sum%==cmdnew start cmd && exit
if %sum%==Cmdnew start cmd && exit
if %sum%==CmdNew start cmd && exit
if %sum%==CMDNEW start cmd && exit
if %sum%==cmd1 start cmd && exit
if %sum%==Cmd1 start cmd && exit
if %sum%==CMD1 start cmd && exit
if %sum%==powershell-noprofile powershell -noprofile
if %sum%==powershell-noprofile powershell -noprofile
if %sum%==powershell-noprofile powershell -noprofile
if %sum%==powershell-noprofile powershell -noprofile
if %sum%==powershell-noprofilenew start powershell -noprofile && exit
if %sum%==powershell-noprofilenew start powershell -noprofile && exit
if %sum%==powershell-noprofilenew start powershell -noprofile && exit
if %sum%==powershell-noprofileNew start powershell -noprofile && exit
if %sum%==powershell-noprofileNew start powershell -noprofile && exit
if %sum%==powershell-noprofileNEW start powershell -noprofile && exit
if %sum%==powershell-noprofile1 start powershell -noprofile && exit
if %sum%==powershell-noprofile1 start powershell -noprofile && exit
if %sum%==powershell-noprofile1 start powershell -noprofile && exit
if %sum%==POWWERSHELL1 start powershell -noprofile && exit
if %sum%==ps powershell -noprofile
if %sum%==Ps powershell -noprofile
if %sum%==PS powershell -noprofile
if %sum%==ps1 start powershell -noprofile && exit
if %sum%==Ps1 start powershell -noprofile && exit
if %sum%==PS1 start powershell -noprofile && exit
if %sum%==Psnew start powershell -noprofile && exit
if %sum%==psnew start powershell -noprofile && exit
if %sum%==PsNew start powershell -noprofile && exit
if %sum%==PSNEW start powershell -noprofile && exit
if %sum%==powershell start powershell && exit
if %sum%==Powershell start powershell && exit
if %sum%==PowerShell start powershell && exit
if %sum%==POWERSHELL start powershell&& exit
set sum=%sum:x=*%
echo.%sum%|findstr /C:"pi" >nul 2>&1 && set goto=1
echo.%sum%|findstr /C:"e" >nul 2>&1 && set goto=1
set sum=%sum:pi=3.14159265358979%
set sum=%sum:e=2.71828182845905%
if %goto%==1 goto calcsum1
if %sum%==? goto help
:calcsum1
powershell -noprofile %sum% > tmpfile
if %errorlevel%==1 cls && echo Error && if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
set /p awnser=<tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
echo.%sum%|findstr /C:"3.14159265358979" >nul 2>&1 && set sum=%sum:3.14159265358979=PI%
echo.%sum%|findstr /C:"2.71828182845905" >nul 2>&1 && set sum=%sum:2.71828182845905=E%
cd %curcd%
echo %sum% = %awnser%
:end
echo Press any key to do another sum
pause > nul
goto start
:help
cls
echo + or = is addition
echo - is subtraction
echo * or x is multiplication
echo / is division
echo Use F7 to view history
echo Type anything that's above the prompt to get to that menu
pause
goto start
:dunits
echo KB
echo MB
echo GB
echo TB
echo PB
set /p dunits=Please enter the measurement-
if %dunits%==KB set dunits=KB
if %dunits%==kb set dunits=KB
if %dunits%==Kb set dunits=KB
if %dunits%==kB set dunits=KB
if %dunits%==K set dunits=KB
if %dunits%==k set dunits=KB
if %dunits%==MB set dunits=MB
if %dunits%==mb set dunits=MB
if %dunits%==Mb set dunits=MB
if %dunits%==mB set dunits=MB
if %dunits%==M set dunits=MB
if %dunits%==m set dunits=MB
if %dunits%==GB set dunits=GB
if %dunits%==gb set dunits=GB
if %dunits%==Gb set dunits=GB
if %dunits%==gB set dunits=GB
if %dunits%==G set dunits=GB
if %dunits%==g set dunits=GB
if %dunits%==TB set dunits=TB
if %dunits%==tb set dunits=TB
if %dunits%==Tb set dunits=TB
if %dunits%==tB set dunits=TB
if %dunits%==T set dunits=TB
if %dunits%==t set dunits=TB
if %dunits%==PB set dunits=PB
if %dunits%==pb set dunits=PB
if %dunits%==Pb set dunits=PB
if %dunits%==pB set dunits=PB
if %dunits%==P set dunits=PB
if %dunits%==p set dunits=PB
:calcdunits
echo 1
echo 2
echo 3
echo Etc.
set /p dunitsnum=What number of units would you like?-
powershell -noprofile %dunitsnum%%dunits% > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo %dunitsnum% %dunits% = %awnser% Bytes
pause
goto start
:sqrt
set sum=[Math]::Sqrt
set /p sqrtnum=What number would you like the Square root of?-
set sqrtnum1=(%sqrtnum%)
powershell -noprofile [Math]::Sqrt(%sqrtnum1%) > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo %sqrtnum% = %awnser%
echo Press any key to do another sum
pause > nul
goto start
:round
set sum=[Math]::Round
set /p roundnum=What number would you like to round?-
set roundnum1=%roundnum%
set roundnum1=%roundnum1:x=*%
set roundnum1=%roundnum1:pi=3.14159265358979%
set roundnum1=%roundnum1:e=2.71828182845905%
echo.%roundnum1%|findstr /C:"*" >nul 2>&1 && goto roundcalc
echo.%roundnum1%|findstr /C:"+" >nul 2>&1 && goto roundcalc
echo.%roundnum1%|findstr /C:"/" >nul 2>&1 && goto roundcalc
echo.%roundnum1%|findstr /C:"-" >nul 2>&1 && goto roundcalc
:round1
set roundnum1=%roundnum1:3.14159265358979=PI%
set roundnum1=%roundnum1:2.71828182845905=E%
set /p amountofdecimals=How many decimal places would you like to round %roundnum1% to?-
set roundnum1=%roundnum1:pi=3.14159265358979%
set roundnum1=%roundnum1:e=2.71828182845905%
powershell -noprofile %sum%(%roundnum1%,%amountofdecimals%) > tmpfile
set roundnum1=%roundnum1:3.14159265358979=PI%
set roundnum1=%roundnum1:2.71828182845905=E%
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo %roundnum1% rounded to %amountofdecimals% decimal places = %awnser%
echo Press any key to do another sum
pause > nul
goto start
:round2
set sum=[Math]::Round
set roundnum=%roundavgawn%
set roundnum1=%roundnum%
set roundnum1=%roundnum1:x=*%
set roundnum1=%roundnum1:pi=3.14159265358979%
set roundnum1=%roundnum1:e=2.71828182845905%
echo.%roundnum1%|findstr /C:"*" >nul 2>&1 && goto roundcalc1
echo.%roundnum1%|findstr /C:"+" >nul 2>&1 && goto roundcalc1
echo.%roundnum1%|findstr /C:"/" >nul 2>&1 && goto roundcalc1
echo.%roundnum1%|findstr /C:"-" >nul 2>&1 && goto roundcalc1
:round3
set roundnum1=%roundnum1:3.14159265358979=PI%
set roundnum1=%roundnum1:2.71828182845905=E%
if defined roundavgnum set amountofdecimals=2
if defined roundavgnum goto afteramntofdecimalsround2
set /p amountofdecimals=How many decimal places would you like to round %roundnum1% to?-
:afteramntofdecimalsround2
set roundnum1=%roundnum1:pi=3.14159265358979%
set roundnum1=%roundnum1:e=2.71828182845905%
powershell -noprofile %sum%(%roundnum1%,%amountofdecimals%) > tmpfile
set roundnum1=%roundnum1:3.14159265358979=PI%
set roundnum1=%roundnum1:2.71828182845905=E%
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo %roundnum1% rounded to %amountofdecimals% decimal places = %awnser%
echo Press any key to do another sum
pause > nul
goto start
:AVG
set /p amntofnumbers=How many numbers are you going to input(Max 4)-
if %amntofnumbers% gtr 4 echo Please enter a max of 3 && cls && goto AVG
if %amntofnumbers% lss 2 echo Please enter a minimum of 2 && cls && goto AVG
if %amntofnumbers%==2 (
set /p avgnum1=Number 1-
set /p avgnum2=Number 2-
)
if %amntofnumbers%==3 (
set /p avgnum1=Number 1-
set /p avgnum2=Number 2-
set /p avgnum3=Number 3-
)
if %amntofnumbers%==4 (
set /p avgnum1=Number 1-
set /p avgnum2=Number 2-
set /p avgnum3=Number 3-
set /p avgnum4=Number 4-
)
set avgnum1=%avgnum1:pi=3.14159265358979%
set avgnum1=%avgnum1:e=2.71828182845905%
set avgnum2=%avgnum2:pi=3.14159265358979%
set avgnum2=%avgnum2:e=2.71828182845905%
set avgnum3=%avgnum3:pi=3.14159265358979%
set avgnum3=%avgnum3:e=2.71828182845905%
set avgnum4=%avgnum4:pi=3.14159265358979%
set avgnum4=%avgnum4:e=2.71828182845905%
if %amntofnumbers%==2 powershell -noprofile (%avgnum1%+%avgnum2%)/2 > tmpfile
if %amntofnumbers%==3 powershell -noprofile (%avgnum1%+%avgnum2%+%avgnum3%)/3 > tmpfile
if %amntofnumbers%==4 powershell -noprofile (%avgnum1%+%avgnum2%+%avgnum3%+%avgnum4%)/4 > tmpfile
set /p awnser= < tmpfile
del /q tmpfile
set avgnum1=%avgnum1:3.14159265358979=PI%
set avgnum1=%avgnum1:2.71828182845905=E%
set avgnum2=%avgnum2:3.14159265358979=PI%
set avgnum2=%avgnum2:2.71828182845905=E%
set avgnum3=%avgnum3:3.14159265358979=PI%
set avgnum3=%avgnum3:2.71828182845905=E%
set avgnum4=%avgnum4:3.14159265358979=PI%
set avgnum4=%avgnum4:2.71828182845905=E%
:avgawnser
if %amntofnumbers%==2 (
echo The average of %avgnum1% and %avgnum2% is %awnser%
goto wouldyouliketoroundavg
)
if %amntofnumbers%==3 (
echo The average of %avgnum1%, %avgnum2% and %avgnum3% is %awnser%
goto wouldyouliketoroundavg
)
if %amntofnumbers%==4 (
echo The average of %avgnum1%, %avgnum2%, %avgnum3% and %avgnum4% is %awnser%
goto wouldyouliketoroundavg
:anykeytostartavg
echo Press any key to do another sum
pause > nul
goto start
)
:wouldyouliketoroundavg
echo 1=Yes
echo 2=No
echo 3=Round to 2 Decimal Places
set /p roundavg=Would you like to round this?-
if not defined roundavg set roundavg=2
if %roundavg%==1 (
set roundavgawn=%awnser%
goto round2
)
if %roundavg%==y (
set roundavgawn=%awnser%
goto round2
)
if %roundavg%==Y (
set roundavgawn=%awnser%
goto round2
)
if %roundavg%==Yes (
set roundavgawn=%awnser%
goto round2
)
if %roundavg%==YES (
set roundavgawn=%awnser%
goto round2
)
if %roundavg%==yes (
set roundavgawn=%awnser%
goto round2
)
if %roundavg%==3 (
set roundavgawn=%awnser%
set roundavgnum=2
goto round2
)
if %roundavg%==2 goto anykeytostartavg
if %roundavg%==n goto anykeytostartavg
if %roundavg%==N goto anykeytostartavg
if %roundavg%==no goto anykeytostartavg
if %roundavg%==No goto anykeytostartavg
if %roundavg%==NO goto anykeytostartavg
goto start
:abs
set /p absvalue=What number would you like to find the absolute value of?-
set sum=[Math]::Abs
powershell -noprofile %sum%(%absvalue%) > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo The absolute value of %absvalue% is %awnser%
echo Press any key to do another sum
pause > nul
goto start
:pow
set /p pow=What number would you like?-
set /p powto=To the power of-
set sum=[Math]::Pow
powershell -noprofile %sum%(%pow%,%powto%) > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo %pow% to the power of %powto% is %awnser%
echo Press any key to do another sum
pause > nul
goto start
:square
set /p sqr=What number would you like to find the square of?-
powershell -noprofile %sqr% * %sqr% > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo The square of %sqr% is %awnser%
echo Press any key to do another sum
pause > nul
goto start
:conv
echo 1=Miles to KM
echo 2=Pounds to KG
echo 3=Celsius to Fahrenheit
echo 4=Fractions to Decimals
echo 5=Percentages to Fractions
echo 6=Percentages to Decimals
echo 7=Percent of a number
echo 8=Percent off
echo 9=Inches to CM
echo 10=GST Calculator
echo 11=Add percent to a number
echo 12=Language Translation jk Google Translate
echo 13=Month Information
echo 14=What percentage a number is in a number
set /p convopt=What option would you like(1,2,3,4,5,6,7,8,9,10,11,12,13,14)-
if %convopt%==1 goto MKM
if %convopt%==2 goto PKG
if %convopt%==3 goto CTF
if %convopt%==4 goto FTD
if %convopt%==5 goto PTF
if %convopt%==6 goto PTD
if %convopt%==7 goto PON
if %convopt%==8 goto PCO
if %convopt%==9 goto ITC
if %convopt%==10 goto GST
if %convopt%==11 goto APS
if %convopt%==12 goto LNG
if %convopt%==13 goto MNT
if %convopt%==14 goto PNN
if %convopt%==gst goto GST
if %convopt%==Gst goto GST
if %convopt%==GST goto GST
:MKM
echo 1=Miles to KM
echo 2=KM to Miles
set /p milesorkm=Would you like to go from Miles to KM or KM to Miles?-
if %milesorkm%==1 goto milesfirst
if %milesorkm%==2 goto kmfirst
:milesfirst
set /p miles=Miles-
powershell -noprofile %miles% * 1.609 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
if %miles%==1 set milesormile=Mile
if not %miles%==1 set milesormile=Miles
cd %curcd%
echo %miles% %milesormile% is %awnser% KM
echo Press any key to do another sum
pause > nul
goto start
:kmfirst
set /p km=Kilometers-
powershell -noprofile %km% / 1.609 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo %km% KM is %awnser% Miles
echo Press any key to do another sum
pause > nul
goto start
:PKG
echo 1=Pounds to KG
echo 2=KG to Pounds
set /p poundkg=What option would you like?-
if %poundkg%==1 goto pfirst
if %poundkg%==2 goto kfirst
:pfirst
set /p pounds=Pounds-
powershell -noprofile %pounds% / 2.205 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
if %pounds%==1 set poundsorpound=Pound
if not %pounds%==1 set poundsorpound=Pounds
cd %curcd%
echo %pounds% %poundsorpound% is %awnser% KG
echo Press any key to do another sum
pause > nul
goto start
:kfirst
set /p kg=KG-
powershell -noprofile %kg% * 2.205 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo %kg% KG is %awnser% Pounds
echo Press any key to do another sum
pause > nul
goto start
:CTF
echo 1=Celsius to Fahrenheit
echo 2=Farenheit to Celsius
set /p ctfopt=What option would you like?-
if %ctfopt%==1 goto cfirst
if %ctfopt%==2 goto ffirst
:cfirst
set /p c=Celsius-
powershell -noprofile (%c%*9/5)+32 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
if %c%==1 set degreeordegrees=Degree
if not %c%==1 set degreeordegrees=Degrees
if %awnser%==1 set degreeordegrees2=Degree
if not %awnser%==1 set degreeordegrees2=Degrees
cd %curcd%
echo %c% %degreeordegrees% Celsius is %awnser% %degreeordegrees2% Farenheit
echo Press any key to do another sum
pause > nul
goto start
:ffirst
set /p f=Farenheit-
powershell -noprofile (%f-%32)*5/9 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
if %f%==1 set fdegreeordegrees=Degree
if not %f%==1 set fdegreeordegrees=Degrees
if %awnser%==1 set fdegreeordegrees2=Degree
if not %awnser%==1 set fdegreeordegrees2=Degrees
echo %f% Degrees Farenheit is %awnser% %fdegreeordegrees2% Celsius
cd %curcd%
echo Press any key to do another sum
pause > nul
goto start
:FTD
echo A calculator cannot go from decimal to fraction :(
set /p nume=Numerator-
set /p deno=Denominator-
powershell -noprofile %nume% / %deno% > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser= < tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
echo / Means the line in the middle of a fraction (Vinculum)
echo %nume% / %deno% = %awnser%
cd %curcd%
echo Press any key to do another sum
pause > nul
goto start
:PTF
echo A calculator cannot go from fractions to percentages :(
set /p percentage=Percentage(No Percentage Sign)-
set deno=100
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
echo / Means the line in the middle of a fraction (Vinculum)
echo %percentage% Percent as a fraction = %percentage% / %deno%
cd %curcd%
echo Press any key to do another sum
pause > nul
goto start
:PTD
echo 1=Percentages to Decimals
echo 2=Decimals to Percentages
set /p ptdopt=What option would you like?-
if %ptdopt%==1 goto PTDPFirst
if %ptdopt%==2 goto PTDDFirst
:PTDPFirst
set /p percentage=Percentage(No Percentage Sign)-
powershell -noprofile %percentage% / 100 > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser= < tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
echo %percentage% Percent = %awnser%
cd %curcd%
echo Press any key to do another sum
pause > nul
goto start
:PTDDFirst
set /p decimal=Decimal(With a 0. at the start)-
powershell -noprofile %decimal% * 100 > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser= < tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
echo %decimal% = %awnser% Percent
cd %curcd%
echo Press any key to do another sum
pause > nul
goto start
:PON
set /p percent=Percentage(No percentage sign)-
set /p numberpon=Number to find the percent of-
powershell -noprofile %percent% / 100 > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser1= < tmpfile
if exist tmpfile del /q tmpfile > nul
powershell -noprofile %awnser1% * %numberpon% > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser= < tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
echo %percent% Percent of %numberpon% = %awnser%
cd %curcd%
echo Press any key to do another sum
pause > nul
goto start
:PCO
set /p numberpco=Origional Price(No dollar sign)-
set /p percent=Percentage off(No percentage sign)-
powershell -noprofile %percent% / 100 > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser1= < tmpfile
if exist tmpfile del /q tmpfile > nul
powershell -noprofile %awnser1% * %numberpco% > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser2= < tmpfile
if exist tmpfile del /q tmpfile > nul
powershell -noprofile %numberpco% - %awnser2% > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser= < tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
echo You save $%awnser2%
echo %percent% Percent off $%numberpco% = $%awnser%
cd %curcd%
echo Press any key to do another sum
pause > nul
goto start
:ITC
echo 1=Inches to CM
echo 2=CM to Inches
set /p inchesorcm=Would you like to go from Inches to CM or CM to Inches?-
if %inchesorcm%==1 goto inchesfirst
if %inchesorcm%==2 goto cmfirst
:inchesfirst
set /p inches=Inches-
powershell -noprofile %inches% * 2.54 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
if %inches%==1 set inchesorinch=Inch
if not %inches%==1 set inchesorinch=Inches
cd %curcd%
echo %inches% %inchesorinch% is %awnser% CM
echo Press any key to do another sum
pause > nul
goto start
:cmfirst
set /p cm=CM-
powershell -noprofile %cm% / 2.54 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
if %awnser%==1 set inchesorinch=Inch
if not %awnser%==1 set inchesorinch=Inches
cd %curcd%
echo %cm% CM is %awnser% %inchesorinch%
echo Press any key to do another sum
pause > nul
goto start
:GST
echo 1=Before
echo 2=After
set /p gstopt=Would you like to calculate GST from a price without before or after GST?(1,2)-
if %gstopt%==1 goto beforegst
if %gstopt%==2 goto aftergst
:beforegst
set /p origprice=Origional Price(No dollar sign)-
powershell -noprofile %origprice% * 1.1 > tmpfile
set /p awnser= < tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
if exist tmpfile del /q tmpfile > nul
powershell -noprofile %awnser% / 11 > tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
set /p gst= < tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo $%origprice% + $%gst% GST = $%awnser%
echo Press any key to do another sum
pause > nul
goto start
:aftergst
set /p priceaftergst=Price After GST(No dollar sign)-
powershell -noprofile %priceaftergst% / 11 > tmpfile
if %errorlevel%==1 cls && echo Error && if del==0 if exist tmpfile del /q tmpfile > nul && pause && cls && goto start
set /p gst= < tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
echo The GST of $%priceaftergst% = $%gst%
echo Press any key to do another sum
pause > nul
goto start
:APS
set /p percent=Percentage(No percentage sign)-
set /p numberaps=Number to add percent to-
powershell -noprofile %percent% / 100 > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser1= < tmpfile
if exist tmpfile del /q tmpfile > nul
powershell -noprofile %awnser1% * %numberaps% > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser2= < tmpfile
if exist tmpfile del /q tmpfile > nul
powershell -noprofile %awnser2% + %numberaps% > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser= < tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
echo %numberaps% + %percent% Percent = %awnser% Total
cd %curcd%
echo Press any key to do another sum
pause > nul
goto start
:LNG
start /max https://translate.google.com
echo Do you really think I was going to code that?
echo Press any key to go back to the start
pause > nul
goto start
:MNT
echo Month Data:
echo Number - Month - Short Form - Days
echo 1 - January - Jan - 31
echo 2 - Feburary - Feb - 28/29
echo 3 - March - Mar - 31
echo 4 - April - Apr - 30
echo 5 - May - May - 31
echo 6 - June - Jun - 30
echo 7 - July - Jul - 31
echo 8 - August - Aug - 31
echo 9 - September - Sep - 30
echo 10 - October - Oct - 31
echo 11 - November - Nov - 30
echo 12 - December - Dec - 31
echo Press any key to go back to the start
pause > nul
cls
goto start
:PNN
set /p num1=Fractioned number-
set /p num2=Total number-
powershell -noprofile %num1% / %num2% * 100 > tmpfile
if %errorlevel%==1 cls && echo Error && del /q tmpfile && pause && cls && goto start
set /p awnser= < tmpfile
if exist tmpfile del /q tmpfile > nul
echo %num1% is %awnser% percent of %num2%
echo Press any key to do another sum
pause > nul
goto start
:roundcalc
powershell -noprofile %roundnum1% > tmpfile
set /p awnser=<tmpfile
if exist tmpfile del /q tmpfile > nul
set date1=%date:/=_%
set date1=%date1: =_%
set time1=%time::=.%
cd %curcd%
goto round1
:replaceEqualSign in sum with +
setlocal enableDelayedExpansion
set "_s=!%~2!#"
set "_r="
:_replaceEqualSign
for /F "tokens=1* delims==" %%A in ("%_s%") do (
if not defined _r ( set "_r=%%A" ) else ( set "_r=%_r%%~4%%A" )
set "_s=%%B"
)
if defined _s goto _replaceEqualSign
endlocal&set "%~2=%_r:~0,-1%"
exit /B