Advertisement
derazanother

l21

Feb 20th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main(){
  4.     int day,mon=31,i;
  5.     printf("Enter date to show * :");
  6.     scanf("%d",&day);
  7.    
  8.     for(i=1;i<=mon;i++){
  9.         printf("%d",i);
  10.         if(i==day){
  11.            printf("*");
  12.         }
  13.         else if(i%7==0) {
  14.             printf("\n");
  15.         }
  16.          else  {
  17.             printf("");
  18.        
  19.     }
  20.     printf(" ");
  21.     }
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement