Hi,
ich will einen Kalender in c programmieren, aber irgendwie komme ich nicht weiter:
das habe ich bis jetzt gemacht:
#include <stdio.h>
int main(){
int i=1, j=1, zahl=1, starttag, ntage;
printf("Bitte Tagesanzahl eingeben:\n");
scanf("%i", &ntage);
printf(" So Mo Di Mi Do Fr Sa\n");
do
{
i++;
for (j = 1; j <= 7; j++)
printf (" %4i", zahl++);
printf ("\n");
}
while (i<=ntage);
return 0;
}
cu
shm
ich will einen Kalender in c programmieren, aber irgendwie komme ich nicht weiter:
das habe ich bis jetzt gemacht:
#include <stdio.h>
int main(){
int i=1, j=1, zahl=1, starttag, ntage;
printf("Bitte Tagesanzahl eingeben:\n");
scanf("%i", &ntage);
printf(" So Mo Di Mi Do Fr Sa\n");
do
{
i++;
for (j = 1; j <= 7; j++)
printf (" %4i", zahl++);
printf ("\n");
}
while (i<=ntage);
return 0;
}
cu
shm