This is for a homework assignment and I'm very new to coding
I was wondering if you were allowed to make two if statements, using the Boolean "&&" symbol, where the statements were similar in one aspect but different in another. The code keeps giving me an error when I add the if else statement, even though the statements look for different requirements. I have to add a lot more requirements and if else statements, however I can't even get the first part to work. Thank you for any help
Code:
#include <stdio.h>
int main()
{
int n,m;
scanf("%d", &n);
scanf("%d", &m);
if (n >= 0 && n-m < 0)
{
printf("A\n");
}
if else (n >= 0 && n-m > 0)
{
printf("B\n");
}
else
{
printf("failed code\n");
}
return 0;
}