making obgect invisble then visible

Ok so i have this

function Update () {
    if (Input.GetKey ("c"))
        renderer.enabled = false;
    else if (Input.GetKey ("c"))
        renderer.enabled = true;

What am i missing to make it so that once the button(c) is pressed the object goes invisible then when i press the button(c) again the object becomes visible again?

This will toggle it each time it's pressed:

function Update()
    if (Input.GetKeyDown(KeyCode.C))
        renderer.enabled = !renderer.enabled;