Zweck des Algorithmus?
Aufgabe lösen
Hallo miteinander,
ich habe eine Hausaufgabe...zu diesem Struktogramm, ich muss ein C-Code dazu schreiben und den Zweck der gezeigten Algorithmus kennen.
Mein Code:
Hier kommt ein Fehler bei "for", ich weiss nicht warum.
Freue mich auf eure Hilfe
ich habe eine Hausaufgabe...zu diesem Struktogramm, ich muss ein C-Code dazu schreiben und den Zweck der gezeigten Algorithmus kennen.
Mein Code:
/* IMPORT ---------------------- */
#include <stdlib.h>
#include <stdio.h>
/* HAUPTPROGRAMM --------------- */
int main()
{
int a=133, b=2, C=0;
for (a > b)
a=a-b;
C=C+1;
printf ("Zahl a = %i, b = %i und C = %i\n", a, b, C);
system("PAUSE"); /* nur während Entwicklungsphase !! */
return 0;
}
Hier kommt ein Fehler bei "for", ich weiss nicht warum.
Freue mich auf eure Hilfe
Please also mark the comments that contributed to the solution of the article
Content-Key: 55529
Url: https://administrator.de/contentid/55529
Printed on: April 18, 2024 at 01:04 o'clock
2 Comments
Latest comment