#include <iostream>using namespace std; int main() { double a, c, d; cin >> c >> d; while(cin >> a){ cout <<" "<< a+d <<" "; d=a; } return 0;}
21 -26 21 -28 19 -30 17 -22 15 -24 13 -26
-5 -7 -9 -11 -13 -5 -7 -9 -11 -13
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!