Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main(void) {
  4. int miesiac,pierwszy_dzien;
  5. scanf("%d%d",&miesiac,&pierwszy_dzien);
  6. char *naglowek = "|Ni|Po|Wt|Sr|Cz|Pi|So|\n";
  7. printf("%s",naglowek);
  8. int pom = 1;
  9. while(pom<pierwszy_dzien+1)
  10. {
  11. printf("| ");
  12. pom++;
  13. }
  14. int dzien = 1;
  15. while(dzien<31)
  16. {
  17. printf("|%2d",dzien);
  18. dzien++;
  19. if(pom%7==0) printf("|\n");
  20. pom++;
  21. }
  22. printf("|");
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement