The if statement does not work even when conditions are met for the code below. The output of float variable sum is always 0, what is the reasoning behind this. Furthermore if "sum = num1 + num2;" within the if statement is replaced with "printf("%f", num1+num2);" the output becomes very odd and random, for it even effects the float variable sum even when there is no reference to it is within the code.
note: using mingw compiler
%%Code
#include<stdio.h>
#include<conio.h>
int main(){
char operation;
float num1;
float num2;
float sum;
scanf("%c", &operation);
scanf("%f", &num1);
scanf("%f", &num1);
if (operation == 'A'|| operation == 'a'){
sum = num1 + num2;
}
printf("%f", &sum);
}