'Delete only user input, not the entire screen

Is there any way to remove only the user input and not the entire program? Here's the program

#include <stdio.h>

int main() {
    int a;
    printf("text");
    scanf("%d", &a);
}

If I were to do clrscr() it would remove everything, and that's not what I want.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source