Print a Formatted Label
The event desk needs a sign for eight mending places. printf writes to stdout, the normal output stream. Its %s placeholder takes the activity string and %d takes the integer count, in that order. This program does not read stdin.
c
#include <stdio.h>
int main(void) {
const char *activity = "Mending";
int places = 8;
printf("%s: %d places\n", activity, places);
return 0;
}
Run it, then change places to 9. The sign should change from Mending: 8 places to Mending: 9 places; the activity stays the same.