Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <ctime>
- #include <stdio.h>
- #include <stdlib.h>
- #include <ctype.h>
- #include <conio.h>
- using namespace std;
- void menu()
- {
- cout<<"[1]Wczytaj"<<endl;
- cout<<"[2]Wyswietl"<<endl;
- cout<<"[3]srednia i suma"<<endl;
- cout<<"[4]minimalny i maksymalny"<<endl;
- cout<<"[5]od najmniejszego"<<endl;
- cout<<"[6]nad i pod srednia"<<endl;
- cout<<"[7]koniec"<<endl;
- }
- void wczytaj()
- {
- int i;
- int tab[i];
- int dochod;
- cout<<"podaj kolejne dochody"<<endl;
- for(i=0;i<4;i++)
- {
- cout<<"podaj dochod nr."<<i<<":";
- cin>>tab[i];
- }
- }
- void wyswietl()
- {
- int i,tab[i];
- for(i=0;i<4;i++)
- {
- cout<<"dochod nr."<<i<<":"<<tab[i]<<endl;
- }
- cout<<( "\nNacisnij Enter by powrocic do menu...")<<endl;
- getch();
- }
- int main(int argc, char** argv)
- {
- int klawisz,i,dochod;
- do{
- menu();
- klawisz = tolower( getchar() );
- switch(klawisz)
- {
- case '1': wczytaj();
- break;
- case '2': wyswietl();
- break;
- default : if(klawisz != 'z')
- putchar('\a');
- break;
- }
- system("CLS");
- }while(klawisz !='z');
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement