Make menu

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

Make a menu which checks user input. It has to support 4 options.

+ should add 1 to counter and print the result.
/ should divide counter by 2 and print the result.
^ should power counter by 2 and as always print the result.
q should quit

Options

now post-mortem time, all source codes will be revealed

Sample input:_

++^^/q

Sample output:

1
2
4
16
8

Sample input:_

+++^+/^+/+/++^+/+/+/+/^//^q+/

Sample output:

1
2
3
9
10
5
25
26
13
14
7
8
9
81
82
41
42
21
22
11
12
6
36
18
9
81

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid380.04632012/05/02 09:36:290B / 20B / 16B
2clock380.03872012/05/02 09:50:100B / 20B / 17B
3kaki390.06132012/04/29 20:15:200B / 21B / 17B

Perl _

RankUserSizeTimeDateStatistics
1teebee350.03282012/04/29 10:16:360B / 17B / 18B
2GlitchMr510.06902012/04/29 03:08:590B / 17B / 34B
3el1n550.03122012/05/04 20:14:170B / 17B / 38B
4nfouille720.03172012/05/02 17:48:240B / ?B / ?B
5test1(pm)430.08432012/05/13 19:34:222B / ?B / ?B
6test1(GlitchMr&el1n)490.11582012/05/13 17:08:550B / 19B / 30B

Python _

RankUserSizeTimeDateStatistics
1leonid600.04302012/05/02 09:36:470B / 35B / 20B
2clock600.03892012/05/02 09:46:590B / 35B / 20B
3Defenestrator600.07052012/05/02 13:54:470B / 35B / 20B
4purintai600.04702012/05/03 19:26:271B / 35B / 20B
5hallvabo670.06972012/04/30 01:33:510B / 40B / 22B
6Hendrik710.13632012/05/05 20:49:180B / 33B / 33B
7aaa1000.05542012/05/03 09:26:496B / 46B / 30B

PHP _

RankUserSizeTimeDateStatistics
1clock690.49342012/05/02 10:41:011B / 34B / 34B

Scheme _

RankUserSizeTimeDateStatistics
1kaki770.11512012/04/29 18:38:190B / 33B / 37B
2kaki730.08392013/03/25 05:40:450B / 28B / 42B

Io _

RankUserSizeTimeDateStatistics
1pooq880.21782012/05/01 23:59:210B / 60B / 26B

JavaScript _

RankUserSizeTimeDateStatistics
1clock630.03652012/05/02 11:49:110B / 39B / 21B
2nn630.05402012/05/02 11:55:310B / 39B / 21B
30mg640.08532012/05/02 21:19:440B / 37B / 24B
4s_hiiragi700.10332012/05/07 21:37:040B / 32B / 38B
5rem740.06482012/05/12 15:11:520B / 33B / 41B
60mg(clock)620.09282012/05/13 13:24:200B / 37B / 22B

Lua _

RankUserSizeTimeDateStatistics
1pooq700.04192012/05/01 16:00:010B / 37B / 32B
2Hendrik840.04072012/05/11 16:00:040B / 48B / 31B

SNOBOL _

RankUserSizeTimeDateStatistics
1chocobi1110.21842012/05/04 22:12:580B / 53B / 36B

Icon _

RankUserSizeTimeDateStatistics
1clock730.02032012/04/29 14:47:100B / 44B / 26B

REXX _

RankUserSizeTimeDateStatistics
1pooq840.04522012/04/29 06:22:230B / 33B / 44B
2teebee(pooq)800.06102012/05/14 08:42:530B / 33B / 40B

BASIC _

RankUserSizeTimeDateStatistics
1pooq670.02552012/04/29 05:55:480B / 33B / 30B

J _

RankUserSizeTimeDateStatistics
1I., S.390.14852012/04/29 13:30:000B / 7B / 31B

C _

RankUserSizeTimeDateStatistics
1L.A.I.N.650.02942012/05/03 21:33:510B / 35B / 30B
2ush650.03452012/05/07 09:34:360B / 34B / 31B
3hoge650.02992012/05/07 13:00:550B / ?B / ?B
4nai660.02892012/05/04 11:06:030B / 34B / 32B
5nn670.02772012/05/03 10:41:320B / 35B / 32B
6shinh670.02932012/05/05 00:20:160B / 34B / 33B
7inaniwa680.03702012/05/07 17:57:560B / 35B / 33B
8masa.sd680.02922012/05/07 23:08:100B / 36B / 32B
9Alinfty690.02582012/05/13 02:29:060B / 37B / 32B
10G.w.690.03512012/05/13 02:39:190B / 37B / 32B
11eha700.03172012/04/30 13:27:240B / 41B / 29B
12Tommy6700.02772012/04/30 22:55:190B / 39B / 31B
13chocobi700.02622012/05/01 03:14:510B / 39B / 31B
14lain710.03302012/05/04 23:28:450B / 37B / 34B
15biggles710.03902012/05/05 09:59:510B / 37B / 34B
16pan830.02722012/05/01 17:12:440B / ?B / ?B
17amat870.03592012/05/01 23:17:400B / 44B / 41B
18smkt1020.02982012/05/04 07:25:350B / 58B / 44B
19JH1500.03412012/05/12 21:56:211B / ?B / ?B

D _

RankUserSizeTimeDateStatistics
1alex1810.07502012/05/12 03:54:210B / ?B / ?B

Haskell _

RankUserSizeTimeDateStatistics
1cojna740.02332012/04/30 05:12:570B / ?B / ?B
2rst76740.11592012/05/03 00:01:310B / 42B / 26B
3mroman960.06102012/05/12 03:22:040B / ?B / ?B

C# _

RankUserSizeTimeDateStatistics
1rem1260.18252012/05/12 14:26:351B / ?B / ?B

Maxima _

RankUserSizeTimeDateStatistics
1pooq1190.48752012/05/01 18:03:280B / 72B / 44B

Euphoria _

RankUserSizeTimeDateStatistics
1clock940.03352012/05/06 18:56:340B / 58B / 30B

wake _

RankUserSizeTimeDateStatistics
1clock1400.07552012/05/04 14:24:260B / 45B / 89B

Postscript _

RankUserSizeTimeDateStatistics
1zzo38880.44542021/05/02 08:33:170B / 61B / 20B

Befunge _

RankUserSizeTimeDateStatistics
1kaki350.03232012/04/29 19:59:370B / 16B / 14B

GolfScript _

RankUserSizeTimeDateStatistics
1leonid210.08892012/05/02 09:43:440B / 7B / 14B
2clock240.23012012/05/03 12:02:160B / 5B / 19B
3nooodl320.07382012/05/01 20:00:440B / ?B / ?B

Grass _

RankUserSizeTimeDateStatistics
1eiyuu20230.04382012/05/03 07:26:300B / 2023B / 0B

Vim _

RankUserSizeTimeDateStatistics
1clock580.07342012/05/10 16:02:114B / 19B / 32B

goruby _

RankUserSizeTimeDateStatistics
1kaki360.12002012/04/29 20:25:190B / 9B / 27B
2leonid360.14122012/05/02 09:56:500B / 15B / 19B
3leonid350.08972012/05/13 03:18:200B / 15B / 18B

Groovy _

RankUserSizeTimeDateStatistics
1clock533.14932012/05/03 15:18:380B / 32B / 19B
2nn553.20802012/05/02 23:09:170B / 33B / 20B

Language Ranking_

RankLangUserSizeScore
1GolfScriptleonid2110000
2Perlteebee356000
3Befungekaki356000
4gorubyleonid356000
5Rubyleonid385526
6JI., S.395384
7Groovyclock533962
8Vimclock583620
9Pythonleonid603500
10JavaScript0mg(clock)623387
11CL.A.I.N.653230
12BASICpooq673134
13PHPclock693043
14Luapooq703000
15Iconclock732876
16Schemekaki732876
17Haskellcojna742837
18REXXteebee(pooq)802625
19Iopooq882386
20Postscriptzzo38882386
21Euphoriaclock942234
22SNOBOLchocobi1111891
23Maximapooq1191764
24C#rem1261666
25wakeclock1401500
26Dalex1811160
27Grasseiyuu2023103

return to the top page