Răspuns:
#include <iostream>
using namespace std;
int main(){
int n;
cout << "n=";
cin >> n;
cout << "a)";
for (int i = 1;i <= n; i++)
cout << i << ' ';
cout << endl << "b)";
for (int i = n;i >= 1; i--)
cout << i << ' ';
cout << endl;
float s = 0;
for (int i = 1;i <= n; i++)
s += i/3.0;
cout << "c)" << s << endl;
return 0;
}
Explicație: