Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

DZone's Guide to

# Calendario De Tareas Repetitivas

· ·
Free Resource

Comment (0)

Save
{{ articles[0].views | formatCount}} Views
```Otro programa de calendario que muestra las tareas repetitivas semanalmente durante un tiempo determinado

```
#include

using namespace std;

char nmeses[12][11]={ "Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
"Septiembre",
"Octubre",
"Noviembre",
"Diciembre"};

char ndias[7][10]={ "Domingo",
"Lunes",
"Martes",
"Miercoles",
"Jueves",
"Viernes",
};

int meses[12]={31,28,31,30,31,30,31,31,30,31,30,31};

int main(){
int i,j,k,l;
int cont=6;

int clases[9][200][2];
int contc[9]={0,0,0,0,0,0,0,0,0};
int semana[9][4]={ {2,2,3,-1},
{2,2,4,-1},
{3,5,5,-1},
{3,5,5,-1},
{1,4,4,-1},
{4,4,5,-1},
{2,4,5,-1},
{1,1,3,3},
{1,1,3,3}};
ofstream arc("clases.txt");

for (i=0;i<12;i++){
for (j=1;j<=meses[i];j++,cont++){
if (! ((i==0 && j>0 && j<24) || (i==2 && j>=21 && j<28))){
for (k=0;k<9;k++){
for (l=0;l<4 && semana[k][l]!=-1;l++){
if (cont%7==semana[k][l]){
clases[k][contc[k]][0]=i;
clases[k][contc[k]][1]=j;
contc[k]++;
}
}
}
}
}
}

for (i=0;i

``````
Topics:

Comment (0)

Save
{{ articles[0].views | formatCount}} Views

Opinions expressed by DZone contributors are their own.