07-25-2023, 10:52 AM
`printf()` is used to display output to the console, and scanf() is used to read input from the user.
int age;
printf("Enter your age: ");
scanf("%d", &age);
printf("Your age is %d\n", age);
int age;
printf("Enter your age: ");
scanf("%d", &age);
printf("Your age is %d\n", age);