close

標題:

努力過了C++問題 公里 碼數 英哩

發問:

#include#include#includeusing namespace std;int main(){ int c,a; float f; cout > c,a; f= (1.609*c); a= (1760*1*c); cout #include #include using namespace std; int main() { int c,a; float f; cout > c,a; f= (1.609*c); a= (1760*1*c); cout "
最佳解答:

最主要問題是,你沒有把結果輸出啊… 你只有 cout #include #include using namespace std; int main() { int c,a; float f1, f2; cout > c >> a; f1 = (1.609*c); f2 = (1760*1*a); cout
其他解答:

aa.jpg

 

此文章來自奇摩知識+如有不便請留言告知

因為會被知識+刪掉,所以我用大寫的<>代替嚕 如果用VC6編譯會有問題唷,我不確定VC2005會不會有這問題 但是還是告訴你一下 #include<iostream.h>跟 using namespace std; 這兩個是會有衝突的 提醒你一下,C++ 的標準式是 #include<iostream> 沒有.h唷 因為看你的寫法都是C++ 所以你的程式只需要這樣就可以了: 我拿上面那位高手的改一下嚕 不需要include的就不要加進來,對程式比較好。 也比較不亂 #include<iostream.h> using namespace std; int main() { int c,a; float f1, f2; cout > c; cout > a; f1 = (1.609*c); f2 = (1760*1*a); cout > c,a; 只要輸入c就夠了吧? f= (1.609*c); a= (1760*1*c); cout

arrow
arrow
    文章標籤
    英哩發 英哩 C++
    全站熱搜
    創作者介紹
    創作者 bgdwze3 的頭像
    bgdwze3

    bgdwze3的部落格

    bgdwze3 發表在 痞客邦 留言(0) 人氣()