1 solutions

  • 0
    @ 2025-11-5 15:49:13

    C :

    #include<stdio.h>
    main()
    {
    	float h,w;
    	float t;
    	scanf("%f %f",&h,&w);
    	t = w / (h*h);
    	if(t < 18)
    		printf("低体重\n");
    	else if(t>=18 && t<25)
    		printf("正常体重\n");
    	else if(t>=25 && t<27)
    		printf("超重体重\n");
    	else 
    		printf("肥胖\n");
    	return 0;
    }
    
    • 1

    Information

    ID
    17210
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By