哪里错了? 新新新手

来源:百度知道 编辑:UC知道 时间:2024/06/21 14:13:24
#include <iostream>
main(){
double e;
double m;
int counter;
counter=0;
for(e=1;e<=100;e++){
m=e/17;
cout<<e<<"pounds on earth is"<<m<<"pounds on moon";
counter++;
if(counter==25){cout<<"\n";counter=0;}
return=0;
}

#include <iostream>
using namespace std; //使用名字空间std,否则识别不了cout
main(){
double e;
double m;
int counter;
counter=0;
for(e=1;e<=100;e++){
m=e/17.0; //如果是17的话,e/17出来的结果会是整数
cout<<e<<"pounds on earth is"<<m<<"pounds on moon";
counter++;
if(counter==25){cout<<"\n";counter=0;}
return=0;
}

#include <iostream.h>
main(){
double e;
double m;
int counter;
counter=0;
for(e=1;e<=100;e++){ //没有与它配对的
m=e/17;
cout<<e<<"pounds on earth is"<<m<<"pounds on moon";
counter++;
if(counter==25){cout<<"\n";counter=0;}

return 0;
}

基本的已经搞定
现在的问题的还少一个 }
我不知你的题目是什么,或是写程序的想法是什么?
不好填啊!

for循环里循环变量请用int型
return=0写法不对,应该是return 0;

#include <iostream>
using n