How can I improve my C++ code?
<p>This is my first program I really created besides hello world. The code is over 400 lines of code and wanted to know of new functions and what not that would help improve my code and my knowledge of C++. I figured I would just dive in and learn on my own instead of out of the book I have "Teach yourself C++ in one hour a day 6th edition".</p>

<p>What are some new functions I can learn that would improve my code?</p>

<pre><code>// Runescape Mining Calculator

#include &lt;iostream&gt;
#include &lt;cmath&gt;
using namespace std;

int main()
{
    int lvl;
    int exp;
    int result;

    cout &lt;&lt; " \t\t\tRunescape Skill Calculator" &lt;&lt; endl;
    cout &lt;&lt; " Enter Target level: ";
    cin&gt;&gt;lvl;

    switch(lvl)
    {
                    case 2: cout &lt;&lt; " What is your current experience? ";;
                    cin &gt;&gt; exp;
                    result=83 - exp;
                    break;
                    case 3: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=174 - exp;
                    break;
                    case 4: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=276 - exp;
                    break;
                    case 5: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=388 - exp;
                    break;
                    case 6: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=512 - exp;
                        break;                  
                    case 7: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=650 - exp;
                    break;                  
                    case 8: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=801 - exp;
                    break;                  
                    case 9: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=969 - exp;
                    break;                  
                    case 10: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1154 - exp;
                    break;
                    case 11: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1358 - exp;
                    break;
                    case 12: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1584 - exp;
                    break;
                    case 13: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1833 - exp;
                    break;
                    case 14: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=2107 - exp;
                    break;
                    case 15: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=2411 - exp;
                    break;
                    case 16: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=2746 - exp;
                    break;
                    case 17: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=3115 - exp;
                    break;
                    case 18: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=3523 - exp;
                    break;
                    case 19: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=3973 - exp;
                    break;
                    case 20: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=4470 - exp;
                    break;
                    case 21: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=5018 - exp;
                    break;
                    case 22: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=5624 - exp;
                    break;
                    case 23: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=6291 - exp;
                    break;
                    case 24: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=7028 - exp;
                    break;
                    case 25: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=7842 - exp;
                    break;
                        case 26: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=8740 - exp;
                    break;
                    case 27: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=9730 - exp;
                    break;
                    case 28: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=10824 - exp;
                    break;
                    case 29: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=12031 - exp;
                    break;
                    case 30: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=13363 - exp;
                    break;
                    case 31: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=14833 - exp;
                    break;
                    case 32: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=16456 - exp;
                    break;
                    case 33: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=18247 - exp;
                    break;
                    case 34: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=20224 - exp;
                    break;
                    case 35: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=22406 - exp;
                    break;
                    case 36: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=24815 - exp;
                    break;
                    case 37: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=27473 - exp;
                    break;
                    case 38: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=30408 - exp;
                    break;
                    case 39: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=33648 - exp;
                    break;
                    case 40: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=37224 - exp;
                    break;
                    case 41: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=41171 - exp;
                    break;
                    case 42: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=45529 - exp;
                    break;
                    case 43: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=50339- exp;
                        break;
                    case 44: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=55649 - exp;
                    break;
                    case 45: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=61512 - exp;
                    break;
                    case 46: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=67983 - exp;
                    break;
                    case 47: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=75127 - exp;
                    break;
                    case 48: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=83014 - exp;
                    break;
                    case 49: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=91721 - exp;
                    break;
                    case 50: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=101333 - exp;
                    break;
                    case 51: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=111945 - exp;
                    break;
                    case 52: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=123660 - exp;
                    break;
                    case 53: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=136594 - exp;
                    break;
                    case 54: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=150872 - exp;
                    break;
                    case 55: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=166636 - exp;
                    break;
                    case 56: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=184040 - exp;
                    break;
                    case 57: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=203254 - exp;
                    break;
                    case 58: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=224466 - exp;
                    break;
                    case 59: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=247886 - exp;
                    break;
                    case 60: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=273742 - exp;
                    break;
                    case 61: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=302288 - exp;
                    break;
                    case 62: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=333804 - exp;
                    break;
                    case 63: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=368599 - exp;
                    break;
                    case 64: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=407015 - exp;
                    break;
                    case 65: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=449428 - exp;
                    break;
                    case 66: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=496254 - exp;
                    break;
                    case 67: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=547953 - exp;
                    break;
                    case 68: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=605032 - exp;
                    break;
                    case 69: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=668051 - exp;
                    break;
                    case 70: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=737627 - exp;
                    break;
                    case 71: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=814445 - exp;
                    break;
                    case 72: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=899257 - exp;
                    break;
                    case 73: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=992895 - exp;
                    break;
                    case 74: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1096278 - exp;
                    break;
                    case 75: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1210421 - exp;
                    break;
                    case 76: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1336443 - exp;
                    break;
                    case 77: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1475581 - exp;
                    break;
                    case 78: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1629200 - exp;
                    break;
                    case 79: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1798808 - exp;
                    break;
                    case 80: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=1986068 - exp;
                    break;
                    case 81: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=2192818 - exp;
                    break;
                    case 82: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=2421087 - exp;
                    break;
                    case 83: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=2673114 - exp;
                    break;
                    case 84: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=2951373 - exp;
                    break;
                    case 85: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=3258594 - exp;
                    break;
                    case 86: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=3597792 - exp;
                    break;
                    case 87: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=3972294 - exp;
                    break;
                    case 88: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=4385776 - exp;
                    break;
                    case 89: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=4842295 - exp;
                    break;
                    case 90: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=5346332 - exp;
                    break;
                    case 91: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=5902831 - exp;
                    break;
                    case 92: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=6517253 - exp;
                    break;
                    case 93: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=7195629 - exp;
                    break;
                    case 94: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=7944614 - exp;
                    break;
                    case 95: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=8771558 - exp;
                    break;
                    case 96: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=9684577 - exp;
                    break;
                    case 97: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=10692629 - exp;
                    break;
                    case 98: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=11805606 - exp;
                    break;
                    case 99: cout &lt;&lt; " What is your current experience? ";
                    cin &gt;&gt; exp;
                    result=13034431 - exp;
                    case 100: cout &lt;&lt; " What is your current experience? " &lt;&lt;endl;
                    cin &gt;&gt; exp;
                    result=14391160 - exp;
                    break;
                    default: exit(0);
                    }
                    cout &lt;&lt; " Experience Needed: " &lt;&lt; result  &lt;&lt; endl;
// Ores needed to be mined to acquire the level up.
                    cout &lt;&lt; " Rune Essence: " &lt;&lt; ceil(result/5.0) &lt;&lt; endl;
                    cout &lt;&lt; " Clay: " &lt;&lt; ceil(result/5.0) &lt;&lt; endl;
                    cout &lt;&lt; " Copper: " &lt;&lt; ceil(result/17.5) &lt;&lt; endl;
                    cout &lt;&lt; " Tin: " &lt;&lt; ceil(result/17.5) &lt;&lt; endl;
                    cout &lt;&lt; " Bluerite: " &lt;&lt; ceil(result/17.5) &lt;&lt; endl;
                    cout &lt;&lt; " Iron: " &lt;&lt; ceil(result/35.0) &lt;&lt; endl;
                    cout &lt;&lt; " Silver: " &lt;&lt; ceil(result/40.0) &lt;&lt; endl;
                    cout &lt;&lt; " Coal: " &lt;&lt; ceil(result/50.0) &lt;&lt; endl;
                    cout &lt;&lt; " Gold: " &lt;&lt; ceil(result/65.0) &lt;&lt; endl;
                    cout &lt;&lt; " Mithril: " &lt;&lt; ceil(result/80.0) &lt;&lt; endl;
                    cout &lt;&lt; " Adamant: " &lt;&lt; ceil(result/ 95.0) &lt;&lt; endl;
                    cout &lt;&lt; " Runite: " &lt;&lt; ceil(result/125.0) &lt;&lt; endl;
                    cout &lt;&lt; endl &lt;&lt; endl &lt;&lt; endl &lt;&lt; "\t\t\tCreated by USDblades" &lt;&lt; endl;
         return 0;
}
</code></pre>

<p>Edit: Sorry was not clear. I am trying to improve the code for the Runescape Skill Calculator I am working on. I am curious if I could have cut out some lines of code by using different functions. The Code provided is my project I am working on. Can you review it and give me pointers?</p>
