Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <string>
- using namespace std;
- int ocenaf(float ocena){
- if(ocena<0)
- cout<<"Podana liczba za mala jest"<<endl;
- if(ocena<=1.50)
- cout<<"niedostateczny"<<endl;
- if((ocena>1.50)&&(ocena<2.51))
- cout<<"dopuszczajacy"<<endl;
- if((ocena>2.50)&&(ocena<3.51))
- cout<<"dostateczny"<<endl;
- if((ocena>3.50)&&(ocena<4.51))
- cout<<"dobry"<<endl;
- if((ocena>4.50)&&(ocena<5.51))
- cout<<"bardzo dobry"<<endl;
- if((ocena>5.50)&&(ocena<=6))
- cout<<"celujacy"<<endl;
- if(ocena>6)
- cout<<"Podana liczba za duza jest"<<endl;
- }
- int plusf(){
- int plusy;
- cout<<"Podaj liczbe plusow"<<endl;
- cin>>plusy;
- if(plusy<3)
- cout<<"za malo plusow na ocene xD"<<endl;
- if ((plusy==4)||(plusy==3))
- cout<<"dostajesz ocene bardzo dobra!"<<endl;
- if (plusy>=5)
- cout<<"dostajesz ocene celujaca!"<<endl;
- }
- int choinka(){
- cout<< " * "<<endl<<
- " *** "<<endl<<
- " ***** "<<endl<<
- " * "<<endl<<
- " *** "<<endl<<
- " ***** "<<endl<<
- " ******* "<<endl<<
- " * "<<endl;
- }
- int main(){
- int wybor;
- char plusy2;
- float ocena2;
- do{
- cout<<endl<<"========================="<<endl<<"Wybierz program, ktory chcesz wykonac."<<endl<<"Lista programow:"<<endl<<
- "[1] ocena słownie z podanej sredniej"<<endl<<
- "[2] plusy"<<endl<<
- "[3] choinka"<<endl<<
- "[4] wyjscie"<<endl;
- cin>>wybor;
- switch(wybor){
- case 1:
- cout<<"Podaj ocene"<<endl;
- cin>>ocena2;
- ocenaf(ocena2);
- break;
- case 2:
- plusf();
- break;
- case 3:
- choinka();
- break;
- }
- }while(wybor!=4);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement