Meine Frage:
Hi, bin gerade mehr oder weniger am verzweifeln, weil ich nicht nachvollziehen kann, wo das Problem liegt.
Meine Ideen:
Ich häng bei dem ersten Teil der Aufgabe... Mein Programm:
#include <stdio.h>
int main()
{
int amax;
int a,b,c;
printf("Welche Zahl? ");
scanf("%u", &amax);
a=1;
b=1;
do
{
c=a+b;
a=b;
b=c;
}
while(a<amax);
return c;
}
Ich versteh nicht, was genau falsch ist. Kann mir jemand weiter helfen? Hab ich die falsche Schleife gewählt?
Lars hat dieses Bild (verkleinerte Version) angehängt:
05.12.2015 23:34
Lars unregistriert
#include <stdio.h>
int main()
{
int amax;
int a,b,c;
printf("Welche Zahl? ");
scanf("%u", &amax);
a=1;
b=1;
do
{
printf("%i,",a);
c=a+b;
a=b;
b=c;
}
while(a<amax);
}
Sorry, das war das falsche Programm... Ich meine das hier.