The hosted Mbed simulator will stop running from December 2022. You can continue to use the simulator locally or host your own version by following these instructions.
#include "mbed.h"
DigitalOut led(LED1);
int main() {
while (1) {
led = !led;
printf("Blink! LED is now %d\n", led.read());
wait_ms(500);
}
}