Aquí está ^^
Código C:
Ver original#include <stdlib.h>
#include <stdio.h>
int main ()
{
int n, d, i, transcurridos, restantes;
int dias[] = {
31, 28, 31, 30,
31, 30, 31, 31,
30, 31, 30, 31
};
transcurridos = 0;
restantes = 0;
do
{
printf ( "Elige un mes del 1 al 12: " ); } while ( n < 1 || n > 12 );
do
{
printf ( "Elige un dia del 1 al 31: " ); } while ( ((n==1||n==3||n==5||n==7||n==8||n==10||n==12))&&(d>31)||(n==4||n==6||n==9||n==11)&&(d>30)||((n==2)&&(d>28))||(d<1) );
for ( i = 0; i < (n - 1); i++ )
{
transcurridos += dias[i];
}
transcurridos += d;
restantes = (365 - transcurridos);
printf ( "Dias restantes: %d\n", restantes
);
return 0;
}
Saludos