Code: Alles auswählen
#include <stdio.h>
#include <iostream>
int s;
int wort;
char k [25];
char wort1 [25], wort2 [25], wort3 [25], wort4 [25], wort5 [25], wort6 [25], wort7 [25], wort8 [25], wort9 [25], wort10 [25], wort11 [25], wort12 [25], wort13 [25], wort14 [25], wort15 [25], wort16 [25], wort17 [25], wort18 [25], wort19 [25], wort20 [25], wort21 [25], wort22 [25], wort23 [25], wort24 [25], wort25 [25];
void pi()
void change()
void change ()
{
  switch (wort)
  {
    case 0: k= wort1;
            break;
    case 1: k= wort2;
            break;
    case 2: k= wort3;
            break;
    case 3: k= wort4;
            break;
    case 4: k= wort5;
            break;
    case 5: k= wort6;
            break;
    case 6: k= wort7;
            break;
    case 7: k= wort8;
            break;
    case 8: k= wort9;
            break;
    case 9: k= wort10;
            break;
    case 10: k= wort11;
            break;
    case 11: k= wort12;
            break;
    case 12: k= wort13;
            break;
    case 13: k= wort14;
            break;
    case 14: k= wort15;
            break;
    case 15: k= wort16;
            break;
    case 16: k= wort17;
            break;
    case 17: k= wort18;
            break;
    case 18: k= wort19;
            break;
    case 19: k= wort20;
            break;
    case 20: k= wort21;
            break;
    case 21: k= wort22;
            break;
    case 22: k= wort23;
            break;
    case 23: k= wort24;
            break;
    case 24: k= wort25;
            break;
  }
}
int main ()
{
  printf ("Geben sie ihre Frage ein:");
  scanf ("%[^ ]", &wort1);
  if (wort1=="?") goto auswerten;
  scanf ("%[^ ]", &wort2);
  if (wort2=="?") goto auswerten;
  scanf ("%[^ ]", &wort3);
  if (wort3=="?") goto auswerten;
  scanf ("%[^ ]", &wort4);
  if (wort4=="?") goto auswerten;
  scanf ("%[^ ]", &wort5);
  if (wort5=="?") goto auswerten;
  scanf ("%[^ ]", &wort6);
  if (wort6=="?") goto auswerten;
  scanf ("%[^ ]", &wort7);
  if (wort7=="?") goto auswerten;
  scanf ("%[^ ]", &wort8);
  if (wort8=="?") goto auswerten;
  scanf ("%[^ ]", &wort9);
  if (wort9=="?") goto auswerten;
  scanf ("%[^ ]", &wort10);
  if (wort10=="?") goto auswerten;
  scanf ("%[^ ]", &wort11);
  if (wort11=="?") goto auswerten;
  scanf ("%[^ ]", &wort12);
  if (wort12=="?") goto auswerten;
  scanf ("%[^ ]", &wort13);
  if (wort13=="?") goto auswerten;
  scanf ("%[^ ]", &wort14);
  if (wort14=="?") goto auswerten;
  scanf ("%[^ ]", &wort15);
  if (wort15=="?") goto auswerten;
  scanf ("%[^ ]", &wort16);
  if (wort16=="?") goto auswerten;
  scanf ("%[^ ]", &wort17);
  if (wort17=="?") goto auswerten;
  scanf ("%[^ ]", &wort18);
  if (wort18=="?") goto auswerten;
  scanf ("%[^ ]", &wort19);
  if (wort19=="?") goto auswerten;
  scanf ("%[^ ]", &wort20);
  if (wort20=="?") goto auswerten;
  scanf ("%[^ ]", &wort21);
  if (wort21=="?") goto auswerten;
  scanf ("%[^ ]", &wort22);
  if (wort22=="?") goto auswerten;
  scanf ("%[^ ]", &wort23);
  if (wort23=="?") goto auswerten;
  scanf ("%[^ ]", &wort24);
  if (wort24=="?") goto auswerten;
  scanf ("%[^ ]", &wort25);
  if (wort25=="?") goto auswerten;
  change();
  switch (k)
  {
    case "Pi": pi ();
  }
  auswerten:
  printf (" %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s", wort1[0], wort2[0], wort3[0], wort4[0], wort5[0], wort6[0], wort7[0], wort8[0], wort9[0], wort10[0], wort11[0], wort12[0], wort13[0], wort14[0], wort15[0], wort16[0], wort17[0], wort18[0], wort19[0], wort20[0], wort21[0], wort22[0], wort23[0], wort24[0], wort25[0]);
  return 0;
}C:\Dokumente und Einstellungen\Steffen\Desktop\Untitled1.c|10|error: expected initializer before "void"|
C:\Dokumente und Einstellungen\Steffen\Desktop\Untitled1.c||In function `int main()':|
C:\Dokumente und Einstellungen\Steffen\Desktop\Untitled1.c|124|error: `change' was not declared in this scope|
C:\Dokumente und Einstellungen\Steffen\Desktop\Untitled1.c|125|error: switch quantity not an integer|
C:\Dokumente und Einstellungen\Steffen\Desktop\Untitled1.c|127|error: `pi' was not declared in this scope|
||=== Build finished: 4 errors, 0 warnings ===|
kann mir jemand helfen?
mfg
Empire
PS: jetzt wisst ihr warum ich funktionen hasse





