WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   C/C++ Programm (http://www.wcm.at/forum/showthread.php?t=43921)

coolbininet 23.01.2002 14:16

C/C++ Programm
 
Hi Leute habe zum lernen da ein kleines Programm, jetzt meine Frage warum funkt das nicht?

#include <stdio.h>

void main(void)
{
int i, anfang, ende;
clrscr();
printf("\nDies ist ein Programm zum Raufzählen von ");
printf("\n");
printf("\n");
printf("\nBitte Anfangszahl eingeben: ");
scanf("%i", &anfang);

printf("\n");
printf("\nBitte Endzahl eingeben: ");
scanf("%i", &ende);

for (i=anfang;i<=ende; i++)
{
printf("\n %i",i);
}
printf("\n Fertig!\n");
}


Sobald ich clrscr(); entferne läuf das Progi tadelos was stimmt also mit dem Clrscr(); nicht?

mfg

Coolbininet

pong 23.01.2002 14:48

für clrscr()brauchst die conio.h zustäzlich

Avenger 23.01.2002 14:53

:D lustiges programm

wennst da als anfangszahl 1 eingibst
und als endzahl 99999
ann zählt er ganz schön lange:D


Alle Zeitangaben in WEZ +2. Es ist jetzt 02:36 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag