scanf() does not output anything, it reads from the standard input.
Maybe can you share some code or explain in more detail what you're after?
Here's a silly example using scanf() and printf():
#include <stdio.h>
int main()
{
int age;
printf("How old are you? ");
scanf("%d", &age);
if (age >= 18)
printf("You are legally and adult.\n");
else
printf("You are legally not an adult yet.\n");
return 0;
}