you don't know how many times the user will input an age, so instead of a for loop consider a while condition? I will use age 0 as an exit, you can do it in different ways, I doubt you want to print happy birthday every single time so I think you need some sort of condition to meet?
also small nitpick, you want to give scanf the pointer to the variable so it can modify it, so in scanf you want &age instead of age
put the whole thing
while(age!=0){
printf("What is your age?");
scanf("%d", &age);
printf("Happy Birthday\n");
}
return 0;
this way you can do it over and over again, if you input 0 you can exit the program at any time
edit: seems I misunderstood, I thought you meant as many times as the user gives an input not as many times as the age... so the above answer is correct and I am wrong in that case.