I have recently started learning c from the course provided by freecodecamp. So, I was writing a very simple program that takes age as input from user and displays you are – years old.
But when I try to run the code it gives the sign running but gives nothing as output. How could I resolve this?
Here is the code:
#include<stdio.h>
#include<stdlib.h>
int main()
{
int age;
printf("Enter your age:");
scanf("%d",&age);
printf("You are %d years old",age);
return 0;
}
New contributor
Muhammad Ibraheem is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.