Advertisement
Guest User

Untitled

a guest
Sep 20th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. # include <stdio.h>
  2.  
  3. int check(int, int, int);
  4. int main()
  5. {
  6. int m, d, y, day;
  7. char days[8][100] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
  8. char monthes[12][100] = {"January", "Febuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"};
  9.  
  10. while(scanf("%d %d %d", &m, &d, &y) != EOF)
  11. {
  12. day = 0;
  13. if(!check(m, d, y))
  14. printf("%d/%d/%d is an invalid date.\n", m, d, y);
  15. }
  16.  
  17. return 0;
  18. }
  19.  
  20. int check(int check_m, int check_d, int check_y)
  21. {
  22. if(check_m<=0 || check_d<=0 || check_y<=0)
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement