Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. int main(int argc,char *argv[])
  2. {
  3.  
  4.  
  5.  
  6. if ( argc == 2)
  7. {
  8.  
  9. if ( *argv[1] == 'i')
  10. {
  11. cout << "Input";
  12. }
  13. else if ( *argv[1] == 'o')
  14. {
  15. cout << "Output!";
  16. }
  17. else
  18. {
  19. cout << "Zły argument!";
  20. }
  21. }
  22. else if ( argc == 1)
  23. {
  24. cout << "Nie podałeś argumentu!";
  25. }
  26. else
  27. {
  28. cout << "Zła ilość argumentow!";
  29. }
  30.  
  31.  
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement