Someone
public text v1 · immutable
/* Includes */
#include<stdio.h>
#include<stdlib.h>
//Global variable decleration
char a[3][5]={"ALIVE","SICK","FAIL"}; // Array holding the 3 different health status`s.
int i;
//Function to generate a random health status.
void health()
{
i=0;
i = rand() % 3; // Generates a random number between 1 and 3.
printf("%s \n",a[i]);
}
main()
{
health();
}