Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 30.61 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int playerRankVal1 = 0;
  14.             int playerRankVal2 = 0;
  15.             int playerRankVal3 = 0;
  16.             int playerRankVal4 = 0;
  17.             int playerRankVal5 = 0;
  18.             string playerRankName1 = "ERROR";
  19.             string playerRankName2 = "ERROR";
  20.             string playerRankName3 = "ERROR";
  21.             string playerRankName4 = "ERROR";
  22.             string playerRankName5 = "ERROR";
  23.             string rankAvg = "ERROR";
  24.             Console.Title = "CSGO Rank Calculator";
  25.             Console.BackgroundColor = ConsoleColor.Black;
  26.             Console.ForegroundColor = ConsoleColor.Yellow;
  27.             Console.WriteLine("Available ranks:");
  28.             Console.WriteLine("");
  29.             Console.WriteLine("Unranked                      - unranked");
  30.             Console.WriteLine("Silver I                      - s1");
  31.             Console.WriteLine("Silver II                     - s2");
  32.             Console.WriteLine("Silver III                    - s3");
  33.             Console.WriteLine("Silver IV                     - s4");
  34.             Console.WriteLine("Silver Elite                  - se");
  35.             Console.WriteLine("Silver Elite Master           - sem");
  36.             Console.WriteLine("Gold Nova I                   - g1");
  37.             Console.WriteLine("Gold Nova II                  - g2");
  38.             Console.WriteLine("Gold Nova III                 - g3");
  39.             Console.WriteLine("Gold Nova Master              - g4");
  40.             Console.WriteLine("Master Guardian I             - mg1");
  41.             Console.WriteLine("Master Guardian II            - mg2");
  42.             Console.WriteLine("Master Guardian Elite         - mge");
  43.             Console.WriteLine("Distinguished Master Guardian - dmg");
  44.             Console.WriteLine("Legendary Eagle               - le");
  45.             Console.WriteLine("Legendary Eagle Master        - lem");
  46.             Console.WriteLine("Supreme Master First Class    - smfc");
  47.             Console.WriteLine("The Global Elite              - ge");
  48.             Console.WriteLine("");
  49.             Console.ForegroundColor = ConsoleColor.Cyan;
  50.             Console.WriteLine("PLEASE ENTER YOUR TEAMMATE'S RANKS");
  51.             Console.ForegroundColor = ConsoleColor.Green;
  52.             Console.WriteLine("");
  53.             Console.Write("- ");
  54.             string playerRank1 = Console.ReadLine();
  55.             if (playerRank1 == "uranked")
  56.             {
  57.                 playerRankVal1 = 0;
  58.                 playerRankName1 = "Unranked";
  59.             }
  60.             else if (playerRank1 == "s1")
  61.             {
  62.                 playerRankVal1 = 1;
  63.                 playerRankName1 = "Silver I";
  64.             }
  65.             else if (playerRank1 == "s2")
  66.             {
  67.                 playerRankVal1 = 2;
  68.                 playerRankName1 = "Silver II";
  69.             }
  70.             else if (playerRank1 == "s3")
  71.             {
  72.                 playerRankVal1 = 3;
  73.                 playerRankName1 = "Silver III";
  74.             }
  75.             else if (playerRank1 == "s4")
  76.             {
  77.                 playerRankVal1 = 4;
  78.                 playerRankName1 = "Silver IV";
  79.             }
  80.             else if (playerRank1 == "se")
  81.             {
  82.                 playerRankVal1 = 5;
  83.                 playerRankName1 = "Silver Elite";
  84.             }
  85.             else if (playerRank1 == "sem")
  86.             {
  87.                 playerRankVal1 = 6;
  88.                 playerRankName1 = "Silver Elite Master";
  89.             }
  90.             else if (playerRank1 == "g1")
  91.             {
  92.                 playerRankVal1 = 7;
  93.                 playerRankName1 = "Gold Nova I";
  94.             }
  95.             else if (playerRank1 == "g2")
  96.             {
  97.                 playerRankVal1 = 8;
  98.                 playerRankName1 = "Gold Nova II";
  99.             }
  100.             else if (playerRank1 == "g3")
  101.             {
  102.                 playerRankVal1 = 9;
  103.                 playerRankName1 = "Gold Nova III";
  104.             }
  105.             else if (playerRank1 == "g4")
  106.             {
  107.                 playerRankVal1 = 10;
  108.                 playerRankName1 = "Gold Nova Master";
  109.             }
  110.             else if (playerRank1 == "mg1")
  111.             {
  112.                 playerRankVal1 = 11;
  113.                 playerRankName1 = "Master Guardian I";
  114.             }
  115.             else if (playerRank1 == "mg2")
  116.             {
  117.                 playerRankVal1 = 12;
  118.                 playerRankName1 = "Master Guardian II";
  119.             }
  120.             else if (playerRank1 == "mge")
  121.             {
  122.                 playerRankVal1 = 13;
  123.                 playerRankName1 = "Master Guardian Elite";
  124.             }
  125.             else if (playerRank1 == "dmg")
  126.             {
  127.                 playerRankVal1 = 14;
  128.                 playerRankName1 = "Distinguished Master Guardian";
  129.             }
  130.             else if (playerRank1 == "le")
  131.             {
  132.                 playerRankVal1 = 15;
  133.                 playerRankName1 = "Legendary Eagle";
  134.             }
  135.             else if (playerRank1 == "lem")
  136.             {
  137.                 playerRankVal1 = 16;
  138.                 playerRankName1 = "Legendary Eagle Master";
  139.             }
  140.             else if (playerRank1 == "smfc")
  141.             {
  142.                 playerRankVal1 = 17;
  143.                 playerRankName1 = "Supreme Master First Class";
  144.             }
  145.             else if (playerRank1 == "ge")
  146.             {
  147.                 playerRankVal1 = 18;
  148.                 playerRankName1 = "The Global Elite";
  149.             }
  150.             Console.Clear();
  151.             Console.BackgroundColor = ConsoleColor.Black;
  152.             Console.ForegroundColor = ConsoleColor.Yellow;
  153.             Console.WriteLine("Available ranks:");
  154.             Console.WriteLine("");
  155.             Console.WriteLine("Unranked                      - unranked");
  156.             Console.WriteLine("Silver I                      - s1");
  157.             Console.WriteLine("Silver II                     - s2");
  158.             Console.WriteLine("Silver III                    - s3");
  159.             Console.WriteLine("Silver IV                     - s4");
  160.             Console.WriteLine("Silver Elite                  - se");
  161.             Console.WriteLine("Silver Elite Master           - sem");
  162.             Console.WriteLine("Gold Nova I                   - g1");
  163.             Console.WriteLine("Gold Nova II                  - g2");
  164.             Console.WriteLine("Gold Nova III                 - g3");
  165.             Console.WriteLine("Gold Nova Master              - g4");
  166.             Console.WriteLine("Master Guardian I             - mg1");
  167.             Console.WriteLine("Master Guardian II            - mg2");
  168.             Console.WriteLine("Master Guardian Elite         - mge");
  169.             Console.WriteLine("Distinguished Master Guardian - dmg");
  170.             Console.WriteLine("Legendary Eagle               - le");
  171.             Console.WriteLine("Legendary Eagle Master        - lem");
  172.             Console.WriteLine("Supreme Master First Class    - smfc");
  173.             Console.WriteLine("The Global Elite              - ge");
  174.             Console.WriteLine("");
  175.             Console.ForegroundColor = ConsoleColor.Cyan;
  176.             Console.WriteLine("PLEASE ENTER YOUR TEAMMATE'S RANKS");
  177.             Console.ForegroundColor = ConsoleColor.Green;
  178.             Console.WriteLine("");
  179.             Console.WriteLine("- " + playerRankName1);
  180.             Console.Write("- ");
  181.             string playerRank2 = Console.ReadLine();
  182.             if (playerRank2 == "uranked")
  183.             {
  184.                 playerRankVal2 = 0;
  185.                 playerRankName2 = "Unranked";
  186.             }
  187.             else if (playerRank2 == "s1")
  188.             {
  189.                 playerRankVal2 = 1;
  190.                 playerRankName2 = "Silver I";
  191.             }
  192.             else if (playerRank2 == "s2")
  193.             {
  194.                 playerRankVal2 = 2;
  195.                 playerRankName2 = "Silver II";
  196.             }
  197.             else if (playerRank2 == "s3")
  198.             {
  199.                 playerRankVal2 = 3;
  200.                 playerRankName2 = "Silver III";
  201.             }
  202.             else if (playerRank2 == "s4")
  203.             {
  204.                 playerRankVal2 = 4;
  205.                 playerRankName2 = "Silver IV";
  206.             }
  207.             else if (playerRank2 == "se")
  208.             {
  209.                 playerRankVal2 = 5;
  210.                 playerRankName2 = "Silver Elite";
  211.             }
  212.             else if (playerRank2 == "sem")
  213.             {
  214.                 playerRankVal2 = 6;
  215.                 playerRankName2 = "Silver Elite Master";
  216.             }
  217.             else if (playerRank2 == "g1")
  218.             {
  219.                 playerRankVal2 = 7;
  220.                 playerRankName2 = "Gold Nova I";
  221.             }
  222.             else if (playerRank2 == "g2")
  223.             {
  224.                 playerRankVal2 = 8;
  225.                 playerRankName2 = "Gold Nova II";
  226.             }
  227.             else if (playerRank2 == "g3")
  228.             {
  229.                 playerRankVal2 = 9;
  230.                 playerRankName2 = "Gold Nova III";
  231.             }
  232.             else if (playerRank2 == "g4")
  233.             {
  234.                 playerRankVal2 = 10;
  235.                 playerRankName2 = "Gold Nova Master";
  236.             }
  237.             else if (playerRank2 == "mg1")
  238.             {
  239.                 playerRankVal2 = 11;
  240.                 playerRankName2 = "Master Guardian I";
  241.             }
  242.             else if (playerRank2 == "mg2")
  243.             {
  244.                 playerRankVal2 = 12;
  245.                 playerRankName2 = "Master Guardian II";
  246.             }
  247.             else if (playerRank2 == "mge")
  248.             {
  249.                 playerRankVal2 = 13;
  250.                 playerRankName2 = "Master Guardian Elite";
  251.             }
  252.             else if (playerRank2 == "dmg")
  253.             {
  254.                 playerRankVal2 = 14;
  255.                 playerRankName2 = "Distinguished Master Guardian";
  256.             }
  257.             else if (playerRank2 == "le")
  258.             {
  259.                 playerRankVal2 = 15;
  260.                 playerRankName2 = "Legendary Eagle";
  261.             }
  262.             else if (playerRank2 == "lem")
  263.             {
  264.                 playerRankVal2 = 16;
  265.                 playerRankName2 = "Legendary Eagle Master";
  266.             }
  267.             else if (playerRank2 == "smfc")
  268.             {
  269.                 playerRankVal2 = 17;
  270.                 playerRankName2 = "Supreme Master First Class";
  271.             }
  272.             else if (playerRank2 == "ge")
  273.             {
  274.                 playerRankVal2 = 18;
  275.                 playerRankName2 = "The Global Elite";
  276.             }
  277.             Console.Clear();
  278.             Console.BackgroundColor = ConsoleColor.Black;
  279.             Console.ForegroundColor = ConsoleColor.Yellow;
  280.             Console.WriteLine("Available ranks:");
  281.             Console.WriteLine("");
  282.             Console.WriteLine("Unranked                      - unranked");
  283.             Console.WriteLine("Silver I                      - s1");
  284.             Console.WriteLine("Silver II                     - s2");
  285.             Console.WriteLine("Silver III                    - s3");
  286.             Console.WriteLine("Silver IV                     - s4");
  287.             Console.WriteLine("Silver Elite                  - se");
  288.             Console.WriteLine("Silver Elite Master           - sem");
  289.             Console.WriteLine("Gold Nova I                   - g1");
  290.             Console.WriteLine("Gold Nova II                  - g2");
  291.             Console.WriteLine("Gold Nova III                 - g3");
  292.             Console.WriteLine("Gold Nova Master              - g4");
  293.             Console.WriteLine("Master Guardian I             - mg1");
  294.             Console.WriteLine("Master Guardian II            - mg2");
  295.             Console.WriteLine("Master Guardian Elite         - mge");
  296.             Console.WriteLine("Distinguished Master Guardian - dmg");
  297.             Console.WriteLine("Legendary Eagle               - le");
  298.             Console.WriteLine("Legendary Eagle Master        - lem");
  299.             Console.WriteLine("Supreme Master First Class    - smfc");
  300.             Console.WriteLine("The Global Elite              - ge");
  301.             Console.WriteLine("");
  302.             Console.ForegroundColor = ConsoleColor.Cyan;
  303.             Console.WriteLine("PLEASE ENTER YOUR TEAMMATE'S RANKS");
  304.             Console.ForegroundColor = ConsoleColor.Green;
  305.             Console.WriteLine("");
  306.             Console.WriteLine("- " + playerRankName1);
  307.             Console.WriteLine("- " + playerRankName2);
  308.             Console.Write("- ");
  309.             string playerRank3 = Console.ReadLine();
  310.             if (playerRank3 == "uranked")
  311.             {
  312.                 playerRankVal3 = 0;
  313.                 playerRankName3 = "Unranked";
  314.             }
  315.             else if (playerRank3 == "s1")
  316.             {
  317.                 playerRankVal3 = 1;
  318.                 playerRankName3 = "Silver I";
  319.             }
  320.             else if (playerRank3 == "s2")
  321.             {
  322.                 playerRankVal3 = 2;
  323.                 playerRankName3 = "Silver II";
  324.             }
  325.             else if (playerRank3 == "s3")
  326.             {
  327.                 playerRankVal3 = 3;
  328.                 playerRankName3 = "Silver III";
  329.             }
  330.             else if (playerRank3 == "s4")
  331.             {
  332.                 playerRankVal3 = 4;
  333.                 playerRankName3 = "Silver IV";
  334.             }
  335.             else if (playerRank3 == "se")
  336.             {
  337.                 playerRankVal3 = 5;
  338.                 playerRankName3 = "Silver Elite";
  339.             }
  340.             else if (playerRank3 == "sem")
  341.             {
  342.                 playerRankVal3 = 6;
  343.                 playerRankName3 = "Silver Elite Master";
  344.             }
  345.             else if (playerRank3 == "g1")
  346.             {
  347.                 playerRankVal3 = 7;
  348.                 playerRankName3 = "Gold Nova I";
  349.             }
  350.             else if (playerRank3 == "g2")
  351.             {
  352.                 playerRankVal3 = 8;
  353.                 playerRankName3 = "Gold Nova II";
  354.             }
  355.             else if (playerRank3 == "g3")
  356.             {
  357.                 playerRankVal3 = 9;
  358.                 playerRankName3 = "Gold Nova III";
  359.             }
  360.             else if (playerRank3 == "g4")
  361.             {
  362.                 playerRankVal3 = 10;
  363.                 playerRankName3 = "Gold Nova Master";
  364.             }
  365.             else if (playerRank3 == "mg1")
  366.             {
  367.                 playerRankVal3 = 11;
  368.                 playerRankName3 = "Master Guardian I";
  369.             }
  370.             else if (playerRank3 == "mg2")
  371.             {
  372.                 playerRankVal3 = 12;
  373.                 playerRankName3 = "Master Guardian II";
  374.             }
  375.             else if (playerRank3 == "mge")
  376.             {
  377.                 playerRankVal3 = 13;
  378.                 playerRankName3 = "Master Guardian Elite";
  379.             }
  380.             else if (playerRank3 == "dmg")
  381.             {
  382.                 playerRankVal3 = 14;
  383.                 playerRankName3 = "Distinguished Master Guardian";
  384.             }
  385.             else if (playerRank3 == "le")
  386.             {
  387.                 playerRankVal3 = 15;
  388.                 playerRankName3 = "Legendary Eagle";
  389.             }
  390.             else if (playerRank3 == "lem")
  391.             {
  392.                 playerRankVal3 = 16;
  393.                 playerRankName3 = "Legendary Eagle Master";
  394.             }
  395.             else if (playerRank3 == "smfc")
  396.             {
  397.                 playerRankVal3 = 17;
  398.                 playerRankName3 = "Supreme Master First Class";
  399.             }
  400.             else if (playerRank3 == "ge")
  401.             {
  402.                 playerRankVal3 = 18;
  403.                 playerRankName3 = "The Global Elite";
  404.             }
  405.             Console.Clear();
  406.             Console.BackgroundColor = ConsoleColor.Black;
  407.             Console.ForegroundColor = ConsoleColor.Yellow;
  408.             Console.WriteLine("Available ranks:");
  409.             Console.WriteLine("");
  410.             Console.WriteLine("Unranked                      - unranked");
  411.             Console.WriteLine("Silver I                      - s1");
  412.             Console.WriteLine("Silver II                     - s2");
  413.             Console.WriteLine("Silver III                    - s3");
  414.             Console.WriteLine("Silver IV                     - s4");
  415.             Console.WriteLine("Silver Elite                  - se");
  416.             Console.WriteLine("Silver Elite Master           - sem");
  417.             Console.WriteLine("Gold Nova I                   - g1");
  418.             Console.WriteLine("Gold Nova II                  - g2");
  419.             Console.WriteLine("Gold Nova III                 - g3");
  420.             Console.WriteLine("Gold Nova Master              - g4");
  421.             Console.WriteLine("Master Guardian I             - mg1");
  422.             Console.WriteLine("Master Guardian II            - mg2");
  423.             Console.WriteLine("Master Guardian Elite         - mge");
  424.             Console.WriteLine("Distinguished Master Guardian - dmg");
  425.             Console.WriteLine("Legendary Eagle               - le");
  426.             Console.WriteLine("Legendary Eagle Master        - lem");
  427.             Console.WriteLine("Supreme Master First Class    - smfc");
  428.             Console.WriteLine("The Global Elite              - ge");
  429.             Console.WriteLine("");
  430.             Console.ForegroundColor = ConsoleColor.Cyan;
  431.             Console.WriteLine("PLEASE ENTER YOUR TEAMMATE'S RANKS");
  432.             Console.ForegroundColor = ConsoleColor.Green;
  433.             Console.WriteLine("");
  434.             Console.WriteLine("- " + playerRankName1);
  435.             Console.WriteLine("- " + playerRankName2);
  436.             Console.WriteLine("- " + playerRankName3);
  437.             Console.Write("- ");
  438.             string playerRank4 = Console.ReadLine();
  439.             if (playerRank4 == "uranked")
  440.             {
  441.                 playerRankVal4 = 0;
  442.                 playerRankName4 = "Unranked";
  443.             }
  444.             else if (playerRank4 == "s1")
  445.             {
  446.                 playerRankVal4 = 1;
  447.                 playerRankName4 = "Silver I";
  448.             }
  449.             else if (playerRank4 == "s2")
  450.             {
  451.                 playerRankVal4 = 2;
  452.                 playerRankName4 = "Silver II";
  453.             }
  454.             else if (playerRank4 == "s3")
  455.             {
  456.                 playerRankVal4 = 3;
  457.                 playerRankName4 = "Silver III";
  458.             }
  459.             else if (playerRank4 == "s4")
  460.             {
  461.                 playerRankVal4 = 4;
  462.                 playerRankName4 = "Silver IV";
  463.             }
  464.             else if (playerRank4 == "se")
  465.             {
  466.                 playerRankVal4 = 5;
  467.                 playerRankName4 = "Silver Elite";
  468.             }
  469.             else if (playerRank4 == "sem")
  470.             {
  471.                 playerRankVal4 = 6;
  472.                 playerRankName4 = "Silver Elite Master";
  473.             }
  474.             else if (playerRank4 == "g1")
  475.             {
  476.                 playerRankVal4 = 7;
  477.                 playerRankName4 = "Gold Nova I";
  478.             }
  479.             else if (playerRank4 == "g2")
  480.             {
  481.                 playerRankVal4 = 8;
  482.                 playerRankName4 = "Gold Nova II";
  483.             }
  484.             else if (playerRank4 == "g3")
  485.             {
  486.                 playerRankVal4 = 9;
  487.                 playerRankName4 = "Gold Nova III";
  488.             }
  489.             else if (playerRank4 == "g4")
  490.             {
  491.                 playerRankVal4 = 10;
  492.                 playerRankName4 = "Gold Nova Master";
  493.             }
  494.             else if (playerRank4 == "mg1")
  495.             {
  496.                 playerRankVal4 = 11;
  497.                 playerRankName4 = "Master Guardian I";
  498.             }
  499.             else if (playerRank4 == "mg2")
  500.             {
  501.                 playerRankVal4 = 12;
  502.                 playerRankName4 = "Master Guardian II";
  503.             }
  504.             else if (playerRank4 == "mge")
  505.             {
  506.                 playerRankVal4 = 13;
  507.                 playerRankName4 = "Master Guardian Elite";
  508.             }
  509.             else if (playerRank4 == "dmg")
  510.             {
  511.                 playerRankVal4 = 14;
  512.                 playerRankName4 = "Distinguished Master Guardian";
  513.             }
  514.             else if (playerRank4 == "le")
  515.             {
  516.                 playerRankVal4 = 15;
  517.                 playerRankName4 = "Legendary Eagle";
  518.             }
  519.             else if (playerRank4 == "lem")
  520.             {
  521.                 playerRankVal4 = 16;
  522.                 playerRankName4 = "Legendary Eagle Master";
  523.             }
  524.             else if (playerRank4 == "smfc")
  525.             {
  526.                 playerRankVal4 = 17;
  527.                 playerRankName4 = "Supreme Master First Class";
  528.             }
  529.             else if (playerRank4 == "ge")
  530.             {
  531.                 playerRankVal4 = 18;
  532.                 playerRankName4 = "The Global Elite";
  533.             }
  534.             Console.Clear();
  535.             Console.BackgroundColor = ConsoleColor.Black;
  536.             Console.ForegroundColor = ConsoleColor.Yellow;
  537.             Console.WriteLine("Available ranks:");
  538.             Console.WriteLine("");
  539.             Console.WriteLine("Unranked                      - unranked");
  540.             Console.WriteLine("Silver I                      - s1");
  541.             Console.WriteLine("Silver II                     - s2");
  542.             Console.WriteLine("Silver III                    - s3");
  543.             Console.WriteLine("Silver IV                     - s4");
  544.             Console.WriteLine("Silver Elite                  - se");
  545.             Console.WriteLine("Silver Elite Master           - sem");
  546.             Console.WriteLine("Gold Nova I                   - g1");
  547.             Console.WriteLine("Gold Nova II                  - g2");
  548.             Console.WriteLine("Gold Nova III                 - g3");
  549.             Console.WriteLine("Gold Nova Master              - g4");
  550.             Console.WriteLine("Master Guardian I             - mg1");
  551.             Console.WriteLine("Master Guardian II            - mg2");
  552.             Console.WriteLine("Master Guardian Elite         - mge");
  553.             Console.WriteLine("Distinguished Master Guardian - dmg");
  554.             Console.WriteLine("Legendary Eagle               - le");
  555.             Console.WriteLine("Legendary Eagle Master        - lem");
  556.             Console.WriteLine("Supreme Master First Class    - smfc");
  557.             Console.WriteLine("The Global Elite              - ge");
  558.             Console.WriteLine("");
  559.             Console.ForegroundColor = ConsoleColor.Cyan;
  560.             Console.WriteLine("PLEASE ENTER YOUR TEAMMATE'S RANKS");
  561.             Console.ForegroundColor = ConsoleColor.Green;
  562.             Console.WriteLine("");
  563.             Console.WriteLine("- " + playerRankName1);
  564.             Console.WriteLine("- " + playerRankName2);
  565.             Console.WriteLine("- " + playerRankName3);
  566.             Console.WriteLine("- " + playerRankName4);
  567.             Console.Write("- ");
  568.             string playerRank5 = Console.ReadLine();
  569.             if (playerRank5 == "uranked")
  570.             {
  571.                 playerRankVal5 = 0;
  572.                 playerRankName5 = "Unranked";
  573.             }
  574.             else if (playerRank5 == "s1")
  575.             {
  576.                 playerRankVal5 = 1;
  577.                 playerRankName5 = "Silver I";
  578.             }
  579.             else if (playerRank5 == "s2")
  580.             {
  581.                 playerRankVal5 = 2;
  582.                 playerRankName5 = "Silver II";
  583.             }
  584.             else if (playerRank5 == "s3")
  585.             {
  586.                 playerRankVal5 = 3;
  587.                 playerRankName5 = "Silver III";
  588.             }
  589.             else if (playerRank5 == "s4")
  590.             {
  591.                 playerRankVal5 = 4;
  592.                 playerRankName5 = "Silver IV";
  593.             }
  594.             else if (playerRank5 == "se")
  595.             {
  596.                 playerRankVal5 = 5;
  597.                 playerRankName5 = "Silver Elite";
  598.             }
  599.             else if (playerRank5 == "sem")
  600.             {
  601.                 playerRankVal5 = 6;
  602.                 playerRankName5 = "Silver Elite Master";
  603.             }
  604.             else if (playerRank5 == "g1")
  605.             {
  606.                 playerRankVal5 = 7;
  607.                 playerRankName5 = "Gold Nova I";
  608.             }
  609.             else if (playerRank5 == "g2")
  610.             {
  611.                 playerRankVal5 = 8;
  612.                 playerRankName5 = "Gold Nova II";
  613.             }
  614.             else if (playerRank5 == "g3")
  615.             {
  616.                 playerRankVal5 = 9;
  617.                 playerRankName5 = "Gold Nova III";
  618.             }
  619.             else if (playerRank5 == "g4")
  620.             {
  621.                 playerRankVal5 = 10;
  622.                 playerRankName5 = "Gold Nova Master";
  623.             }
  624.             else if (playerRank5 == "mg1")
  625.             {
  626.                 playerRankVal5 = 11;
  627.                 playerRankName5 = "Master Guardian I";
  628.             }
  629.             else if (playerRank5 == "mg2")
  630.             {
  631.                 playerRankVal5 = 12;
  632.                 playerRankName5 = "Master Guardian II";
  633.             }
  634.             else if (playerRank5 == "mge")
  635.             {
  636.                 playerRankVal5 = 13;
  637.                 playerRankName5 = "Master Guardian Elite";
  638.             }
  639.             else if (playerRank5 == "dmg")
  640.             {
  641.                 playerRankVal5 = 14;
  642.                 playerRankName5 = "Distinguished Master Guardian";
  643.             }
  644.             else if (playerRank5 == "le")
  645.             {
  646.                 playerRankVal5 = 15;
  647.                 playerRankName5 = "Legendary Eagle";
  648.             }
  649.             else if (playerRank5 == "lem")
  650.             {
  651.                 playerRankVal5 = 16;
  652.                 playerRankName5 = "Legendary Eagle Master";
  653.             }
  654.             else if (playerRank5 == "smfc")
  655.             {
  656.                 playerRankVal5 = 17;
  657.                 playerRankName5 = "Supreme Master First Class";
  658.             }
  659.             else if (playerRank5 == "ge")
  660.             {
  661.                 playerRankVal5 = 18;
  662.                 playerRankName5 = "The Global Elite";
  663.             }
  664.             Console.Clear();
  665.             Console.BackgroundColor = ConsoleColor.Black;
  666.             Console.ForegroundColor = ConsoleColor.Yellow;
  667.             Console.WriteLine("Available ranks:");
  668.             Console.WriteLine("");
  669.             Console.WriteLine("Unranked                      - unranked");
  670.             Console.WriteLine("Silver I                      - s1");
  671.             Console.WriteLine("Silver II                     - s2");
  672.             Console.WriteLine("Silver III                    - s3");
  673.             Console.WriteLine("Silver IV                     - s4");
  674.             Console.WriteLine("Silver Elite                  - se");
  675.             Console.WriteLine("Silver Elite Master           - sem");
  676.             Console.WriteLine("Gold Nova I                   - g1");
  677.             Console.WriteLine("Gold Nova II                  - g2");
  678.             Console.WriteLine("Gold Nova III                 - g3");
  679.             Console.WriteLine("Gold Nova Master              - g4");
  680.             Console.WriteLine("Master Guardian I             - mg1");
  681.             Console.WriteLine("Master Guardian II            - mg2");
  682.             Console.WriteLine("Master Guardian Elite         - mge");
  683.             Console.WriteLine("Distinguished Master Guardian - dmg");
  684.             Console.WriteLine("Legendary Eagle               - le");
  685.             Console.WriteLine("Legendary Eagle Master        - lem");
  686.             Console.WriteLine("Supreme Master First Class    - smfc");
  687.             Console.WriteLine("The Global Elite              - ge");
  688.             Console.WriteLine("");
  689.             Console.ForegroundColor = ConsoleColor.Cyan;
  690.             Console.WriteLine("PLEASE ENTER YOUR TEAMMATE'S RANKS");
  691.             Console.ForegroundColor = ConsoleColor.Green;
  692.             Console.WriteLine("");
  693.             Console.WriteLine("- " + playerRankName1);
  694.             Console.WriteLine("- " + playerRankName2);
  695.             Console.WriteLine("- " + playerRankName3);
  696.             Console.WriteLine("- " + playerRankName4);
  697.             Console.WriteLine("- " + playerRankName5);
  698.             Console.WriteLine("");
  699.             Console.ForegroundColor = ConsoleColor.Cyan;
  700.             int rankSum = playerRankVal1 + playerRankVal2 + playerRankVal3 + playerRankVal4 + playerRankVal5;
  701.             double rankAvgVal = rankSum / 5;
  702.             if (rankAvgVal == 0)
  703.             {
  704.                 rankAvg = "Unranked";
  705.             }
  706.             else if (rankAvgVal == 1)
  707.             {
  708.                 rankAvg = "Silver I";
  709.             }
  710.             else if (rankAvgVal == 2)
  711.             {
  712.                 rankAvg = "Silver II";
  713.             }
  714.             else if (rankAvgVal == 3)
  715.             {
  716.                 rankAvg = "Silver III";
  717.             }
  718.             else if (rankAvgVal == 4)
  719.             {
  720.                 rankAvg = "Silver IV";
  721.             }
  722.             else if (rankAvgVal == 5)
  723.             {
  724.                 rankAvg = "Silver Elite";
  725.             }
  726.             else if (rankAvgVal == 6)
  727.             {
  728.                 rankAvg = "Silver Elite Master";
  729.             }
  730.             else if (rankAvgVal == 7)
  731.             {
  732.                 rankAvg = "Gold Nova 1";
  733.             }
  734.             else if (rankAvgVal == 8)
  735.             {
  736.                 rankAvg = "Gold Nova 2";
  737.             }
  738.             else if (rankAvgVal == 9)
  739.             {
  740.                 rankAvg = "Gold Nova 3";
  741.             }
  742.             else if (rankAvgVal == 10)
  743.             {
  744.                 rankAvg = "Gold Nova Master";
  745.             }
  746.             else if (rankAvgVal == 11)
  747.             {
  748.                 rankAvg = "Master Guardian I";
  749.             }
  750.             else if (rankAvgVal == 12)
  751.             {
  752.                 rankAvg = "Master Guardian II";
  753.             }
  754.             else if (rankAvgVal == 13)
  755.             {
  756.                 rankAvg = "Master Guardian Elite";
  757.             }
  758.             else if (rankAvgVal == 14)
  759.             {
  760.                 rankAvg = "Distinguished Master Guardian";
  761.             }
  762.             else if (rankAvgVal == 15)
  763.             {
  764.                 rankAvg = "Legendary Eagle";
  765.             }
  766.             else if (rankAvgVal == 16)
  767.             {
  768.                 rankAvg = "Legendary Eagle Master";
  769.             }
  770.             else if (rankAvgVal == 17)
  771.             {
  772.                 rankAvg = "Supreme Master First Class";
  773.             }
  774.             else if (rankAvgVal == 18)
  775.             {
  776.                 rankAvg = "The Global Elite";
  777.             }
  778.             Console.Title = "CSGO Rank Calculator - " + rankAvg;
  779.             Console.WriteLine("Rank average: " + rankAvg);
  780.             Console.ReadKey();
  781.         }
  782.     }
  783. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement