谁帮我在你们的C++上运行一下我写的这段代码。在我机器上运行不了,可又没错误!

来源:百度知道 编辑:UC知道 时间:2024/05/25 14:36:24
#include<iostream.h>
void main()
{
float huashengprice=2.0f;
float appleprice=5.0f;
float bananaprice=4.0f;

float huashengweight=0.0f;
float appleweight=0.0f;
float bananaweight=0.0f;

float total=0.0;

cout<<"买多少花生?"<<endl;
cin>>"huashengweight";
cout<<"买多少苹果?"<<endl;
cin>>"appleweight";
cout<<"买多少香蕉?"<<endl;
cin>>"bananaweight";

total=huashengprice*huashengweight+
appleprice*appleweight+
bananaprice*bananaweight;
cout<<"需花钱"<<total<<endl;
}

#include<iostream.h>
void main()
{
float huashengprice=2.0f;
float appleprice=5.0f;
float bananaprice=4.0f;

float huashengweight=0.0f;
float appleweight=0.0f;
float bananaweight=0.0f;

float total=0.0;

cout<<"买多少花生?"<<endl;
cin>>huashengweight; //这里不加引号
cout<<"买多少苹果?"<<endl;
cin>>appleweight; //这里不加引号
cout<<"买多少香蕉?"<<endl;
cin>>bananaweight; //这里不加引号

total=huashengprice*huashengweight+
appleprice*appleweight+
bananaprice*bananaweight;
cout<<"需花钱"<<total<<endl;
}

在我的电脑上不能运行C语言环境. 我想买一台笔记本电脑,要双核独显,有个并行口的笔记本电脑,在市场上找不到。你们能帮我找一下吗? 能帮我看看这程序错在哪吗或者看看在你们机子上能运行吗 哪位能帮我运行一下这几个C程序 我 的C语言问题 请你们帮一下!!谢谢\ 我刚买的电脑我不知道安装什么样的杀毒软件好,想让你们帮我一下,在网上能不能下载,在什么网站上 赵薇是不是在前段时间出了一首新歌啊,我在电视上看到了一下,请你们帮我查查,我真的很想知道!感激不尽 谁可以帮我分析一下~~~~~说说你们的看法 我想知道我现在不想在我的学校上学了想去你们学校上专科现在我能去么?希望大家帮我问一下。谢谢 哪位好心人帮我解决一下关于C语言程序不能顺利运行的问题?我的QQ:379365920