首页上一页 1  下一页尾页 3 条记录 1/1页
        《根据父母身高计算儿子的身高》在vs2022里调试为什么有错误警告???
                 	
                        发表在C语言图书答疑
                        2021-12-05                        
悬赏:2 学分                        
                    		
                            《零基础学C语言》第1章 C语言概述                                                	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    #include<stdio.h>
#define HEG 0.54
float height(float father,float mother);
int main()
{
	float father;
	float mother;
	float son;
	printf("父亲的身高\n");
	scanf("%f", &father);
	 
	printf("母亲的身高\n");
	scanf("%f", &mother);
	son = height(father, mother);
	printf("儿子的身高\n");
	printf("%.2f\n", son);
	return 0;
}
float height(float father, float mother)
{
	float son = (father + mother) * HEG;
	return son;
}
	
                                                
购物车
发表新帖
立即签到
                    
已解决
                






