Calling functions using a switch statement isnt working : <p>I am new to writing in c and I am attempting to use switch statement to call function according to an input. Not sure as to why this isn't working. Sorry if this is posted in the wrong place or has already been answered but I couldn't find anything.</p>

<pre><code>    int choice;

printf("---Menu---\n");

printf("1 Add Two Vectors\n");

printf("2 Subtract Two Vectors\n");

printf("3 Calculate Euclian Distance\n");

printf("4 Exit The Program\n");
printf("  Please select an option (1, 2, 3, or 4): ");
scanf("&amp;d", &amp;choice);

switch (choice){
case 1: 
addVectors();
    break;
case 2: 
subVectors();
    break;
case 3: 
euclianDistance();
    break;
</code></pre>

<p>/*this is the function being called */</p>

<pre><code>printf("Please input Vector 1 X and Y coordinate separated by a space: ");
    scanf("&amp;d", "&amp;d", &amp;coordinateX1, &amp;coordinateY1);
printf("Please input Vector 2 X and Y coordinate separated by a space: ");
    scanf("&amp;d", "&amp;d", &amp;coordinateX2, &amp;coordinateY2);
vectorSumX = coordinateX1 + coordinateX2;
vectorSumY = coordinateY1 + coordinateY2;
printf("Sum of vectors is: (", &amp;vectorSumX), printf(",", &amp;vectorSumY), printf(")");

return 0;
</code></pre>

<p>Thank you!</p>
