-
Pseudocode ?
I have tryed everything, but I just don´t know how to compile this pseudocode!
I would like to know , what is the result of this pseudo code?
Thanks in advance :)
Code:
//////////////////////////////////////////////////////
int max (int a, int b)
{
if (a > b)
return a;
return b;
}
int F[] = {2, 3, 5, 2, 3, 5}, i, s = 0;
for (i = 0; i < 6; i = i + 2)
{
s = s + max (F[i], F[i+1]);
printf (“%d: %d”, i, s);
}
printf (“Summe: %d”, s);
///////////////////////////////////////////
Thank you very much
Student from Austria
-
You don't compile pseudo-code.
Pseudo-code is some text that looks somewhat like code, but is not really. It is used to show an idea, but a bit more work is to write actual code (actual in the sense that a compiler or interpreter will accept it and, when run, the desired results are accepted)