An electronic device comprising: a display configured to receive a user input; at least two piezoelectric elements disposed adjacent to the display ; a memory configured to store information about the user input; and a processor electrically connected to the display, the at least two piezoelectric elements, and the memory, wherein the processor applies a control signal corresponding to the user input to a first piezoelectric element of the at least two piezoelectric elements based on the information about the user input and allows the first piezoelectric element vibrating depending on the control signal to output at least one of a specified vibration or a specified sound, in the display , wherein the control signal is generated based on a location of the user input; wherein the processor is configured to: identify a type of a writing instrument object selected by a user by manipulating a setting menu on the display of the electronic device ; and apply the control signal corresponding to the type of the writing instrument object to the first piezoelectric element ; wherein a second piezoelectric element of the at least two piezoelectric elements, which does not generate a vibration, measures a voltage displacement generated in response to the vibration of the first piezoelectric element, and wherein the processor applies a different control signal to the first piezoelectric element depending on the measured voltage displacement. a display configured to receive a user input; at least two piezoelectric elements disposed adjacent to the display ; a memory configured to store information about the user input; and a processor electrically connected to the display, the at least two piezoelectric elements, and the memory, wherein the processor applies a control signal corresponding to the user input to a first piezoelectric element of the at least two piezoelectric elements based on the information about the user input and allows the first piezoelectric element vibrating depending on the control signal to output at least one of a specified vibration or a specified sound, in the display , wherein the control signal is generated based on a location of the user input; wherein the processor is configured to: identify a type of a writing instrument object selected by a user by manipulating a setting menu on the display of the electronic device ; and apply the control signal corresponding to the type of the writing instrument object to the first piezoelectric element ; wherein a second piezoelectric element of the at least two piezoelectric elements, which does not generate a vibration, measures a voltage displacement generated in response to the vibration of the first piezoelectric element, and wherein the processor applies a different control signal to the first piezoelectric element depending on the measured voltage displacement. identify a type of a writing instrument object selected by a user by manipulating a setting menu on the display of the electronic device ; and apply the control signal corresponding to the type of the writing instrument object to the first piezoelectric element ; wherein a second piezoelectric element of the at least two piezoelectric elements, which does not generate a vibration, measures a voltage displacement generated in response to the vibration of the first piezoelectric element, and wherein the processor applies a different control signal to the first piezoelectric element depending on the measured voltage displacement. <EOS>