Home > database >  Be urgent!!!! For a great god
Be urgent!!!! For a great god

Time:09-26

Be urgent!!!!!! O god!
Health information systems in a university is as follows:
Student id name gender date of birth height weight allergic constitution high pressure low BMI
201558501901 Hong Tao M 1997/01/02 1.80 70 Y 110 70 Medium
201558501902 Zhao Lan F 1998/10/08 1.60 75 Y 110 70 High

Description:
(1) student number is composed of 12 digits: 1-4: admission year, five to nine: professional departments, 10: class, 11-12: number of students in the class;
(2) units for m height, body weight unit for kg;
(3) BMI calculation formula is: weight/height squared
(4) the normal BMI range as follows: 18.5 to 23.9;
Please design the medical information system:
(1) to determine the various data in the system data types and decimal retain digits;
(2) determine the entry of the medical information system;
(3) the calculation of medical information system;
(4) to determine the output of the medical information system;
(5) the output information all students of the medical system;
BMI in (6) output system is not normal students;
BMI in (7) output system is not the normal students and students in professional departments,

Program features: according to the prompt output XX university medical information system of students information
Input: student id name gender date of birth height weight allergic constitution high voltage low voltage
Output: student id name gender date of birth height weight allergic constitution high pressure low BMI
(name if the BMI is not normal, the output of students and faculty professional
#include


Int main ()
{
/* data structure definition */
Long long number;/* student number: 201458503221 */
char name[20];/* name: HongTao */
char sex;/* */gender
Char birthday [20]./* */birthday
A double height;/* */height
Int weight;/* */weight
Char Isallergy;/* is allergic constitution */
Int highblood;/* * hypertension/
Int lowblood;/* hypotension */
Double bmi;/* the BMI value */
Int major;/* */
, and science/* */master logic

Printf (" * * * * * * * * * * * * * * * * * * * * * * * XX medical information at the university of * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ n ");
Printf (" * * * * * * * * * * * * * * * * * * * * * * * Enter example as follows: * * * * * * * * * * * * * * * * * * * * \ n ");
Printf (" student id name gender date of birth height weight allergic constitution high voltage low voltage \ n ");
Printf (" 201558501901 HongTao M 1997/01/02 1.80 70 Y 110 70 \ n ");
//enter student id
Printf (" * * * * * * * * * * * * * * * * * * * * * * * * the Output example as follows: * * * * * * * * * * * * * * * * * * * * * * * * * \ n ");
Printf (" student id name gender date of birth height weight allergic constitution high pressure low BMI \ n ");
Printf (" Enter: \ n ");
While (the scanf (" % I64d ", & amp; Number)!=(EOF)
{
Other information *//* enter the student
The scanf (" % s % % lf c % s % d % c % d % d ", the name, & amp; Sex, birthday, & amp; Height, & amp; Weight, & amp; Isallergy, & amp; Highblood, & amp; Lowblood);
/* * according to the format according to the student information/
Printf (" % I64d % s % % c % s. The lf % d % 2 c % d % d ", number, name, sex, birthday, height, weight, Isallergy, highblood, lowblood);

Calculate BMI/* */
Bmi=weight/height * height);
If (bmi<18.5)
Printf (" Low \ n ");
Else if (bmi> 23.9)
Printf (" High \ n ");
The else
Printf (" Medium \ n ");
/* output system in BMI is not normal students and students in the college professional */

If (bmi<18.5 | | bmi> 23.9)
{
Printf (" Exist student whose BMI is unnormal: \ n ");
/* output BMI is not normal students name */
Name: printf (" % s \ n ", name);
/* output of BMI is not normal students major */
Printf (" do print his or its ehrs zhuanye: \ n ");
Output the students professional */*/
Major=(number/10000) % 10000;
Printf (" major in % d \ n ", major);
}
Printf (" * * * * * * * * * * * * * * * * * * * * * * * Enter example as follows: * * * * * * * * * * * * * * * * * * * * \ n ");
Printf (" student id name gender date of birth height weight allergic constitution high voltage low voltage \ n ");
Printf (" Enter: \ n ");
}
return 0;
}

The program of
While (the scanf (" % I64d ", & amp; Number)!=(EOF)
{
Other information *//* enter the student
The scanf (" % s % % lf c % s % d % c % d % d ", the name, & amp; Sex, birthday, & amp; Height, & amp; Weight, & amp; Isallergy, & amp; Highblood, & amp; Lowblood);
/* * according to the format according to the student information/
Printf (" % I64d % s % % c % s. The lf % d % 2 c % d % d ", number, name, sex, birthday, height, weight, Isallergy, highblood, lowblood);


Can be replaced with something else?

  • Related