Computer Science, asked by shweta109, 1 year ago

how can we convert the days to month in terminal by using switch?please help me

Answers

Answered by Rajputana007
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

shweta109: thanks
shweta109: sorry but I want program in linux
Rajputana007: oh sorry
shweta109: it's okk friend
Answered by chaitanyakrishn1
0
1month = 30 days

So multiply by 30

That's it

shweta109: bt frend I want code
chaitanyakrishn1: Sorry I don't know linux
shweta109: ok..thanks
shweta109: It's ok
Similar questions