input: Write a function to calculate the objective function of a linear equation. The function should take three parameters: a, b, and c, which represent the coefficients in the linear equation ax + by = c. The function should return the value of the objective function which is a*x + b*y - c. If the given coefficients are a = 3, b = 5, and c = 7, the function should return the calculated result based on the objective function. If the equation has no solution, the function should return None.
  
  assert linear_eq(3, 5, 7) == -7
  assert linear_eq(2, 4, 6) == -6
  assert linear_eq(1, 1, 1) == -1
  assert linear_eq(0, 0, 0) == 0
  assert linear_eq(0, 1, 2) == -2
output: def linear_eq(a, b, c):
      if a == 0 and b == 0:
          return None
      x = 0
      y = 0
      return a * x + b * y - c