0
Please tell me the correction in this program ...
#include<iostream> void main() { int anArray[3]; anArray[0]=2; anArray[1]=3; anArray[2]=4; int nSum=anArray[0]+anArray[1]+anArray[2]; cout<<"The sum is "<<nSum<<endl; }
3 ответов
+ 7
All of you forgotten to return 0 but it's just a minor problem so nvm :x
+ 6
you forgot the library:
using namespace std;
+ 4
#include<iostream>
using namespace std;
int main()
{
int anArray[3];
anArray[0]=2;
anArray[1]=3;
anArray[2]=4;
int nSum=anArray[0]+anArray[1]+anArray[2];
cout<<"The sum is "<<nSum<<endl;
}