#include <iostream>
using namespace std;
int main()
{
int arr[]={1,2,3,4,5,6};
for (int i = 0; i < 6; i++) {
if (arr[i]%2==0){
arr[i]=arr[i]+10;
}
else arr[i]=arr[i]*2;
cout<<arr[i]<<" ";
}
return 0;
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter