what is wrong with this?

using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;

public class driveindycar : MonoBehaviour {
private int speed = 0

void Update()
{
	while speed > 0:
		speed = speed -1
			print ("Too fast")
	
	
	
	if(Input.GetKey(KeyCode.UpArrow))
				speed = speed + 3

Writing what exactly you want would be “a little bit” easiet to understand what you want.
From code you show, i understand that you want to speed up something on keyboard input.

void Update(){  

//This will increase to 3 slowly
if(Input.GetKey(KeyCode.UpArrow)){
    if(speed < 3){
        speed += 3 * Time.deltaTime;
        if(speed > 3) speed = 3;
    }
}

//slows down if there is not input
else{
    if(speed > 0){
        speed -= 3 * Time.deltaTime;
        if(speed < 0) speed = 0;
    }
}

}