#include "stdafx.h" #include "stdio.h" #include "conio.h" #include "string.h" #include "fstream.h" #include "iostream.h" #include "stdlib.h" main() { int a1,c,ch='a',a3; char ax[1],ac[1],a2; do { //********************************* Willkommen :P******************************** system("cls"); printf ("\n\n !!!W E L C O M E!!! \n\n\n\n\n\n"); //********************************* Menue******************************** printf ("\n [1] Lagerbestand \n"); printf (" [2] Bestelliste \n"); printf (" [3] Statistik \n"); printf (" [4] Dokumentation \n\n\n\n\n"); printf (" [5] Exit \n\n\n\n\n\n"); printf (" Mit ENTER Bestaetigen: "); //* Abfrage scanf ("%s",&ax); if(atoi(ax)>5) { a1=0; } else { a1=atoi(ax); } //*********************************** Wenn antwort <<(IM MENUE)>> 1 dann... ******************************** if (a1==1) { system("cls"); printf ("\n\n !!!W E L C O M E!!! \n\n\n\n\n\n"); FILE *stream; char dateiname[]="lagerbestand.txt"; if((stream=fopen(dateiname,"r")) == NULL) { printf("\nFehler beim Lesen der datei. Bitte starten sie das Programm erneut."); printf("\nVielen dank fuer ihr Verstaendnis."); getch(); break; } ch=fgetc(stream); while(!feof(stream)) { putchar(ch); ch=fgetc(stream); } //*********************************** Abfrage <<(Lagerbestand)>> *********************************** do{ scanf("%i",&a3); if(a3>5) { break; } if(a3==1) { system("cls"); printf("\nHallo1"); } if(a3==2) { system("cls"); printf("\nHallo2"); } if(a3==3) { a3=0; } if(a3==4) { a3=0; } if(a3==5) { break; } } while(a3<5); }; //*********************************** Wenn antwort <<(IM MENUE)>> 2 dann... ******************************** if (a1==2) { system("cls"); printf ("\n\n !!!W E L C O M E!!! \n\n\n\n\n\n"); FILE *stream; char dateiname[]="bestelliste.txt"; if((stream=fopen(dateiname,"r")) == NULL) { printf("\nFehler beim Lesen der datei. Bitte starten sie das Programm erneut."); printf("\nVielen dank fuer ihr Verstaendnis."); getch(); break; } ch=fgetc(stream); while(!feof(stream)) { putchar(ch); ch=fgetc(stream); } //*********************************** Abfrage <<(Bestelliste)>> *********************************** do{ scanf("%i",&a3); if(a3>5) { break; } if(a3==1) { system("cls"); printf("\nHallo1"); } if(a3==2) { system("cls"); printf("\nHallo2"); } if(a3==3) { a3=0; } if(a3==4) { a3=0; } if(a3==5) { break; } } while(a3<5); } //*********************************** Wenn antwort <<(IM MENUE)>> 3 dann... ******************************** if (a1==3) { system("cls"); printf ("\n\n !!!W E L C O M E!!! \n\n\n\n\n\n"); FILE *stream; char dateiname[]="statistik.txt"; if((stream=fopen(dateiname,"r")) == NULL) { printf("\nFehler beim Lesen der datei. Bitte starten sie das Programm erneut."); printf("\nVielen dank fuer ihr Verstaendnis."); getch(); break; } ch=fgetc(stream); while(!feof(stream)) { putchar(ch); ch=fgetc(stream); } //*********************************** Abfrage <<(Statistik)>> *********************************** do{ scanf("%i",&a3); if(a3>5) { break; } if(a3==1) { system("cls"); printf("\nHallo1"); } if(a3==2) { system("cls"); printf("\nHallo2"); } if(a3==3) { a3=0; } if(a3==4) { a3=0; } if(a3==5) { break; } } while(a3<5); }; //*********************************** Wenn antwort <<(IM MENUE)>> 4 dann... ******************************** if (a1==4) { system("cls"); FILE *stream; char dateiname[]="dokumentation.txt"; if((stream=fopen(dateiname,"r")) == NULL) { printf("\nFehler beim Lesen der datei. Bitte starten sie das Programm erneut."); printf("\nVielen dank fuer ihr Verstaendnis."); getch(); break; } ch=fgetc(stream); while(!feof(stream)) { putchar(ch); ch=fgetc(stream); } //*********************************** Abfrage <<(Dokumentation)>> *********************************** do{ scanf("%i",&a3); if(a3>5) { break; } if(a3==1) { system("cls"); printf("\nHallo1"); } if(a3==2) { system("cls"); printf("\nHallo2"); } if(a3==3) { a3=0; } if(a3==4) { a3=0; } if(a3==5) { break; } } while(a3<5); }; //*********************************** Wenn antwort <<(IM MENUE)>> 5 dann... ******************************** if (a1==5) { printf ("\n Exit \n\n"); }; } while (a1 < 5) ; }