code not working and instead returning value 3221225477

Posted by Just_Big_5902@reddit | learnprogramming | View on Reddit | 7 comments

hello, i have a bunch of exercices to do in C, but somehow nothing i write works and i have no idea why. when i looked it up all i found was that it appears when you try to open u file that doesn't exist or using pointers that lead nowhere and i did neither. any help or hint would ne much appreciated

#include <math.h>
#include <stdio.h>

int a;
int b;

int main() {
scanf("%d",a);
scanf("%d",b);
/*if(b % 2 != 0){
printf("%f",a *( b-1) +a);
}
else{
if(b % 2 == 0 && b > 0) {
printf("%f\n",a *( b-1) +a);
}
}*/
return 0;
}