Advertisement
Guest User

AbeMurica

a guest
Jan 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. void helloworld()
  4. {
  5.   printf("Hello World\n");
  6. }
  7.  
  8. void helloname(char* name)
  9. {
  10.   printf("Hello %s\n", name);
  11. }
  12.  
  13.  
  14. void main(int argc, char** argv)
  15. {
  16.   if(argc == 1)
  17.     helloworld();
  18.   else if(argc == 2)
  19.     helloname(argv[1]);
  20.   else
  21.     printf("Goodbye World\n");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement