Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int day,mon=31,i;
- printf("Enter date to show * :");
- scanf("%d",&day);
- for(i=1;i<=mon;i++){
- printf("%d",i);
- if(i==day){
- printf("*");
- }
- else if(i%7==0) {
- printf("\n");
- }
- else {
- printf("");
- }
- printf(" ");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement