Hi everyone I am new to C, I have only started to learn and practice it 2 days ago, and I am trying to write my first program, which is a currency converter. I have nailed the first part, but in the if statement part of the code, it seems to be failing. I am trying to test my code by putting in the input I want and even though the condition of the if statement is met, the code in it is not activating. Any help would be appreciated.
#include <stdio.h>
int main()
{
char currency[3];
printf("What is your currency? (can only be USD or AED)\n");
scanf("%s", currency);
if (currency == "USD") {
printf("How many dollars are you converting?\n");
int money;
scanf("%d", &money);
long finalResult;
finalResult = money*3.67;
printf("You have %ld",finalResult);
}
}