首页上一页 1  下一页尾页 1 条记录 1/1页
        VISUALC++入门经典第2章的第3个例子计算错误
                 	
                        发表在VC++答疑区
                        2015-08-20                                                
                    		
                                                                            	
                        
                        
                    
                    
                    	是否精华
                    	是
                    	否
                    
                    
                    
                            版块置顶:
                            是
                            否
                        
                    
                                           源码是
#include "stdafx.h"
#include "iostream"
using namespace std;
int main(int argc, char* argv[])
{
float stature1,stature2,stature3,stature4,stature5;
double average;
cout<<"请输入5个身高:(单位:厘米) \n";
cin>>stature1>>stature2>>stature3>>stature4>>stature5;
average = (stature1 + stature2 + stature3 + stature4 + stature5)/ 5;
cout<<"这5个平均身高是: "<<average<<"厘米";
return 0;
}
        
                
        	
        
        
    #include "stdafx.h"
#include "iostream"
using namespace std;
int main(int argc, char* argv[])
{
float stature1,stature2,stature3,stature4,stature5;
double average;
cout<<"请输入5个身高:(单位:厘米) \n";
cin>>stature1>>stature2>>stature3>>stature4>>stature5;
average = (stature1 + stature2 + stature3 + stature4 + stature5)/ 5;
cout<<"这5个平均身高是: "<<average<<"厘米";
return 0;
}

 
	
                                                 VIP会员
VIP会员 购物车
购物车


 私信
                         私信 
                     发表新帖
发表新帖 立即签到
立即签到 
        		  
        		 
         		 关注
关注
                  回复
 回复 支持(
                	支持( 反对(
                    反对( 
               			  
                







 
                     
                     
					 
						 
						 
						 
						