How to convert days to minutes using C

1 Answer

0 votes
#include <stdio.h>

int daysToMinutes(int days) {
    return days * 24 * 60;
}

int main(void) {
    printf("%d\n", daysToMinutes(1)); 
    printf("%d\n", daysToMinutes(2)); 
    printf("%d", daysToMinutes(13)); 
}


  
  
  
  
/*
run:
  
1440
2880
18720
  
*/

 



answered Mar 1, 2022 by avibootz

Related questions

1 answer 138 views
1 answer 95 views
95 views asked Mar 1, 2022 by avibootz
1 answer 155 views
1 answer 108 views
108 views asked Mar 1, 2022 by avibootz
1 answer 112 views
1 answer 110 views
...