#include <stdio.h>
int main() {
int n;
printf("enter the value of n: \n");
if (scanf("%d", &n) != 1) {
printf("invalid.");
} else if (n <= 0) {
printf("error.");
} else {
printf("%d is a natural number \n", n);
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: