Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- double al(double a)
- {
- if(a == 1)
- return a;
- return (pow(a,3) + al(a - 1));
- }
- int main()
- {
- int a;
- cin >> a;
- cout << al(a);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement