#include <stdio.h>
int main() {
int n;
printf("Enter a number n\n");
scanf("%d",&n);
printf("n=%d\n",n);
while(n)
{
if(n<0){
break;
}
printf("Number entered %d\n",n);
}
printf("You entered a negative number");
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: