Is there a way to shorten this code or make it more compact?

I’m making levels and a level select, what can I do here to make it shorter or atleast more readable considering there are a lot more.

				if(GUI.Button (new Rect(100, 100, 300, 75), "Level 1", interStyle)){
					newLevel (1);
				}
				if(PlayerPrefs.GetInt("LevelC1") == 1){
					if(GUI.Button (new Rect(100, 175, 300, 75), "Level 2", interStyle)){
						newLevel (2);
					}
				} else { GUI.Label(new Rect(100, 175, 300, 75), "Level Locked", interStyle); }
				if(PlayerPrefs.GetInt("LevelC2") == 1){
					if(GUI.Button (new Rect(100, 250, 300, 75), "Level 3", interStyle)){
						newLevel (3);
					}
				} else { GUI.Label(new Rect(100, 250, 300, 75), "Level Locked", interStyle); }
				if(PlayerPrefs.GetInt("LevelC3") == 1){
					if(GUI.Button (new Rect(100, 325, 300, 75), "Level 4", interStyle)){
						
					}
				} else { GUI.Label(new Rect(100, 325, 300, 75), "Level Locked", interStyle); }
				if(PlayerPrefs.GetInt("LevelC4") == 1){
					if(GUI.Button (new Rect(100, 400, 300, 75), "Level 5", interStyle)){
						
					}
				} else { GUI.Label(new Rect(100, 400, 300, 75), "Level Locked", interStyle); }

Thanks,

Jan Julius.

You can use a for loop as below:

void OnGUI()
{

	for (int i=0; i<4; i++)
	{
		if(i==0)
		{
			if(GUI.Button (new Rect(100, 100, 300, 75), "Level "+i.ToString()))
			{
				newLevel (i);
			}
		}
		else
		{
			if(PlayerPrefs.GetInt("LevelC"+i.ToString()) == 1)
			{
				if(GUI.Button (new Rect(100, 100+(i*75), 300, 75), "Level "+(i+1).ToString())){
					newLevel (i+1);
				}
			}
			else 
			{
				GUI.Label(new Rect(100, 100+(i*75), 300, 75), "Level Locked");
			}
		}
	}

}