Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void function(int);
  5.  
  6. int main()
  7. {
  8. int a;
  9. cout<<"a=:";
  10. cin>>a;
  11. function(a);
  12. system("pause");
  13. return 0;
  14. }
  15.  
  16. void function(int a)
  17. {
  18. if(a<1){
  19. cout<<pow (a,3)+(pow (a,3)+2*a)<<endl;
  20. } else {
  21. cout<<(2*(2*a + 5))/(14-(a/3))<<endl;
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement