This paper describes the use of an adjoint method for aerodynamic and aeroacoustic optimization. An adjoint method is used to find an optimum distribution of blowing in a convergent-divergent nozzle to achieve a desired pressure distribution in the nozzle with the goal of noise reduction. This paper describes the development of a three-dimensional adjoint method for simulations on multi-block structured grids. An example is given where a particular blowing distribution is first imposed. The resulting pressure distribution is used as the target distribution with no blowing as an initial condition. It is shown that after several cycles, a blowing distribution is obtained that provides the desired or target pressure distribution.