Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void function(int);
  5.  
  6. int main()
  7. {
  8. int a,b;
  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>0){
  19. cout<<"positive "<<endl;
  20. } else {
  21. cout<<"negative "<<endl;
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement