+ 2
What is the error in this code..code is in description section...??
#include <iostream> using namespace std; int main() { int a[10] , sum=0 ,i; cout<<"enter 10 elements of array"<<endl; for(i=0;i<10;i++) { cin>>a[i]>>endl ; sum=sum+a[i] } cout<<sum<<endl; return 0; }
2 ответов
+ 12
Don't use endl with cin.
0
thank you Hatsy Rei