Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main(void) {
- int miesiac,pierwszy_dzien;
- scanf("%d%d",&miesiac,&pierwszy_dzien);
- char *naglowek = "|Ni|Po|Wt|Sr|Cz|Pi|So|\n";
- printf("%s",naglowek);
- int pom = 1;
- while(pom<pierwszy_dzien+1)
- {
- printf("| ");
- pom++;
- }
- int dzien = 1;
- while(dzien<31)
- {
- printf("|%2d",dzien);
- dzien++;
- if(pom%7==0) printf("|\n");
- pom++;
- }
- printf("|");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement