#6024: _C++


HPSH10011004 (怡)


#include<iostream>
using namespace std;
int main() {
    int a, b , c;
    while(cin >> a >> b) {
    int c= a + b;
    count << c <<endl;
    }
    return 0;
    }

 

上面是我打的程式
可是出現兩個錯誤

code_951213.cpp: In function ‘int main()’:
code_951213.cpp:7: error: ‘count’ was not declared in this scope

可是我不知道怎麼改
請問有人可以教我嗎

#6029: Re:C++


HPSH10011004 (怡)


#include<iostream>
using namespace std;
int a;
int b;
int c=a+b;   
   {
count << c <<endl;
    return 0;
    }
code_952848.cpp:7: error: expected unqualified-id before ‘{’ token
↑上面的是什麼意思??
#6039: Re:C++


lfs92002 (GMan每日殺水題1.6449340668482264364...)


#include
using namespace std;
int main() {
    int a, b , c;
    while(cin >> a >> b) {
    int c= a + b;
    count << c <    }
    return 0;
    }

 

上面是我打的程式
可是出現兩個錯誤

code_951213.cpp: In function ‘int main()’:
code_951213.cpp:7: error: ‘count’ was not declared in this scope

可是我不知道怎麼改
請問有人可以教我嗎

 count用在這怪怪的吧?
應該用cout才對 
 
#include<iostream>
using namespace std;
int main() {
int a, b , c;
while(cin >> a >> b) {
int c= a + b;
cout << c <<endl;
}
return 0;
}
 
int c可以不要,直接寫 cout <<   a + b  <<endl; 
#6040: Re:C++


HPSH10011004 (怡)


#include
using namespace std;
int main() {
    int a, b , c;
    while(cin >> a >> b) {
    int c= a + b;
    count << c <    }
    return 0;
    }

 

上面是我打的程式
可是出現兩個錯誤

code_951213.cpp: In function ‘int main()’:
code_951213.cpp:7: error: ‘count’ was not declared in this scope

可是我不知道怎麼改
請問有人可以教我嗎

 count用在這怪怪的吧?
應該用cout才對 
#include
using namespace std;
int main() {
int a, b , c;
while(cin >> a >> b) {
int c= a + b;
cout << c <
}
return 0;
}
int c可以不要,直接寫 cout <<   a + b  <

 
謝謝你~!!