Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void function(int);
- int main()
- {
- int a;
- cout<<"a=:";
- cin>>a;
- function(a);
- system("pause");
- return 0;
- }
- void function(int a)
- {
- if(a<1){
- cout<<pow (a,3)+(pow (a,3)+2*a)<<endl;
- } else {
- cout<<(2*(2*a + 5))/(14-(a/3))<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement