write c++ program to Compute and print the summation of two numbers using array

write c++ program to Compute and print the summation of two numbers using array


#include <iostream>
#include<string>
using namespace std;
int main()
{ 

int x[3]; 
cin>>x[0]>>x[1]; 
x[2]=x[0]+x[1];
cout<<x[2];
cout<<endl;

}