Let us begin shall we?

So my assignment for the mid-term this semester is to put together a basic calculator that supports memory functions. I have been getting lots of help from a tutor who uses Borland C Builder. It's funny because - with his help - we were able to get the basic operations to work on Borland, and as soon as I run the program anywhere else, it goes back to skipping my while loop. (Part of it may have to do with the flushall() function that is rarely supported by other compilers.)

I shall present my code:

Code:
/* C-Calculator by Matthew Nicola */
/* Mid-Term project of M. Fagan's C Programming Class */

#include <stdio.h>
#include <conio.h>	/* Might be needed for miscellanious functions */
#pragma hdrstop

/*This is where the coding takes place:*/

#pragma argsused
int
main(void)


{
    double a, m, v, x;   /* x prevents the loop from breaking */
                         /* a is main entry, m is memory, and v is value */
    char opr;            /* opr is the operator */
    
    x = 0;
    a = 0.0;

 /* Calculator Introduction */
 
 printf("Welcome to Matt Nicola's C Calculator!\n");
 printf("Enter a value and then enter the operator\n");
 printf("to perform an action with the value. Enjoy!\n\n");
 
/* -----CAUTION: Here comes the loop for operations!----- */

	printf("The current value is %lf", &a);
    	printf("\nPlease enter value: ");
	scanf("%lf", &v);
    	flushall()
    	printf("\nPlease enter operator: ");
	opr = getchar();

	while(x != 1)      /* Loop will not be broken until x equals 1 */
	
 {              
    if (opr == '+')		    /* Addition */
		a=a+v;
	else if (opr == '-')	/* Subtraction */
		a=a-v;
	else if (opr == 'X')	/* Multiplication */
		a=a*v;
	else if (opr == '/')	/* Division */
		a=a/v;
	else if (opr == 'M')	/* Activate Memory */
		a=m;
	else if (opr == 'A')	/* Memory Add-on */
		a=a+m;
	else if (opr == 'D')	/* Memory Value Deduct */
		a=a-m;
	else if (opr == 'C')	/* Clear Current Value */
		a=0.0;
	else if (opr == 'E')    /* Option to exit program */
        	x = 1;
    	else
		printf("\nThat operation is invalid.\n");

	printf("The current value is %lf", &a);
	printf("\nPlease enter value: ");
	scanf("%lf", &v);
	flushall()
	printf("\nPlease enter operator: ");
	opr = getchar();
	
  }

/* The loop is now completed! Well done! */

	printf("Finished!");

	return (0);
}
As my instructor checked this out, he emailed me that the coding's pretty bad. He suggested that I apply more detail to the getchar() function and forget about flushall() because Bloodshed can not recognize it. He also says that I must make it ask for the operator first. In addition, the value remains zero for some reason - throughout all activity.

Advantages
My teacher is a nice guy so he'll understand if I turn in the program late. I shall recieve a small deduction in points upon my return of the fixed coding.

Disadvantages
Our textbooks are suppose to apply to the actions of Borland C Builder; the instructor checks everyone's work by using Bloodshed at home. In addition, the labs in our T building do not have it installed so it's harder on us to find an appropriate compiler.

What do you veterans suggest would be my first step into bringing this calculator to life? As you help me out, I shall continue to look for bugs in the code and possibly check some reference links.