You have a ton of problems with syntax but that aside your logic problems stems from messy seperation of what each loop does.
Outer loop: adds 2 to the term, adds the fac result to the output sum.
Inner loop: Fac'ing the term.
Im not sure you are fac'ing right. Try using recursion as it brings beautiful solution to fac'ing.
public void myFunc(int n){
int sum = 0;
int term = 2;
for (int i = 1; i <= n ; i++){
if(i % 2 == 0)
{
sum -= myFac(term);
} else {
sum += myFac(term);
}
term += 2;
}
System.out.println(sum);
}
Remember to use highlight tags, or you code is unreadable