Stream of patients screening

Description Title
currently in vogue is a flow period, in order to better divert treatment, body temperature and cough hospitals require the patient to be checked at the time of registration, the initial determination for over 37.5 degrees (37.5 degrees equals containing) patients and coughing A stream of the patient (screening). Now we need to count one day come to seek treatment for patients registered how many people were screened for the flow of patients.
Input
first line treatment of patients registered day come number n. (N <200)
followed by n-rows, each row is patient information, including three pieces of information: Name (string, without spaces, up to 8 characters), body temperature (a float), if the cough (integer, 1 represents cough, 0 means no cough). Each line of information between the three separated by a space.
Output
sequentially output all patients be screened for a stream input order of names, each name per line. After re-output line, expressed as the number of patients screened was a stream.
Sample input the Copy
. 5
Zhang 0 38.3
of Li 37.5. 1
Wang 37.1. 1
Zhao 39.0. 1
Liu 38.2. 1
sample output the Copy
of Li
Zhao
Liu
. 3

# include<stdio.h>
# include<string.h>
	struct  com 
   {
	    char name[9];
	    double T;
	    int   x;
      }addbook[200];
int main()
{
	int m,n,count;
	count=0;
	scanf("%d",&n);
	for(m=0;m<n;m++)
	{
		scanf("%s",addbook[m].name);
		scanf("%lf",&addbook[m].T);
		scanf("%d",&addbook[m].x);
	}
	for(m=0;m<n;m++)
	{
		if(addbook[m].x==1&&addbook[m].T>=37.5); 
		{
			printf("%s\n",addbook[m].name);
			count++;
		}
	}
	printf("%d",count);
	return 0;
}

Published 123 original articles · won praise 8 · views 20000 +

Guess you like

Origin blog.csdn.net/Du798566/article/details/104710108