#include <iostream>
using namespace std;
int main(){
int n,i,x[100];
//Citire date
cin >> n;
for(i=1;i<=n;i++) cin >> x[i];
//Rezolvare cerinta
for(i=1;i<n;i++){
if(x[i]*2==x[i+1]) cout << "(" << x[i] << "," << x[i+1] << ") ";
}
}
Sper ca te-am ajutat sa intelegi problema !
Lasa comentariu daca ai neclaritati