how can we convert the days to month in terminal by using switch?please help me
Answers
Answered by
1
Here's your code which you can use to covert months into days #--☺--#
Code :
main ( )
{
int months , days ;
printf( "Enter days\n" )
scanf( "%d" , &days) ;
months = days / 30;
days = days % 30 ;
printf ( "Months = %d days = %d " , months , days ) ;
}
Output
Enter days
265
Months = 8 Days = 5
Enter days
364
Months = 12 Days = 4
#___________☺_____________#
HOPE IT HELPED YOU
HAVE A NICE DAY
Code :
main ( )
{
int months , days ;
printf( "Enter days\n" )
scanf( "%d" , &days) ;
months = days / 30;
days = days % 30 ;
printf ( "Months = %d days = %d " , months , days ) ;
}
Output
Enter days
265
Months = 8 Days = 5
Enter days
364
Months = 12 Days = 4
#___________☺_____________#
HOPE IT HELPED YOU
HAVE A NICE DAY
shweta109:
thanks
Answered by
0
1month = 30 days
So multiply by 30
That's it
So multiply by 30
That's it
Similar questions