Print a number
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version.
Print a number
To print a number, use %d and put the number after the comma: printf("%d\n", 7);.
Print the number 7. %d is the slot for a whole number.
Click Run to see the output here.