Advertisement
Guest User

jakies zaliczenie xD

a guest
Oct 18th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.63 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <string>
  4.  
  5. using namespace std;
  6.  
  7. int ocenaf(float ocena){
  8.     if(ocena<0)
  9.         cout<<"Podana liczba za mala jest"<<endl;
  10.        
  11.     if(ocena<=1.50)
  12.         cout<<"niedostateczny"<<endl;
  13.        
  14.     if((ocena>1.50)&&(ocena<2.51))
  15.         cout<<"dopuszczajacy"<<endl;
  16.        
  17.     if((ocena>2.50)&&(ocena<3.51))
  18.         cout<<"dostateczny"<<endl;
  19.        
  20.     if((ocena>3.50)&&(ocena<4.51))
  21.         cout<<"dobry"<<endl;
  22.        
  23.     if((ocena>4.50)&&(ocena<5.51))
  24.         cout<<"bardzo dobry"<<endl;
  25.    
  26.     if((ocena>5.50)&&(ocena<=6))
  27.         cout<<"celujacy"<<endl;
  28.    
  29.     if(ocena>6)
  30.         cout<<"Podana liczba za duza jest"<<endl;
  31. }
  32. int plusf(){
  33.     int plusy;
  34.     cout<<"Podaj liczbe plusow"<<endl;
  35.     cin>>plusy;
  36.     if(plusy<3)
  37.         cout<<"za malo plusow na ocene xD"<<endl;
  38.     if ((plusy==4)||(plusy==3))
  39.         cout<<"dostajesz ocene bardzo dobra!"<<endl;
  40.     if (plusy>=5)
  41.         cout<<"dostajesz ocene celujaca!"<<endl;
  42. }
  43. int choinka(){
  44.     cout<<  "     *      "<<endl<<
  45.             "    ***     "<<endl<<
  46.             "   *****    "<<endl<<
  47.             "     *      "<<endl<<
  48.             "    ***     "<<endl<<
  49.             "   *****    "<<endl<<
  50.             "  *******   "<<endl<<
  51.             "     *      "<<endl;
  52. }
  53. int main(){
  54.     int wybor;
  55.     char plusy2;
  56.     float ocena2;
  57.    
  58.     do{
  59.         cout<<endl<<"========================="<<endl<<"Wybierz program, ktory chcesz wykonac."<<endl<<"Lista programow:"<<endl<<
  60.         "[1] ocena słownie z podanej sredniej"<<endl<<
  61.         "[2] plusy"<<endl<<
  62.         "[3] choinka"<<endl<<
  63.         "[4] wyjscie"<<endl;
  64.         cin>>wybor;
  65.         switch(wybor){
  66.         case 1:
  67.             cout<<"Podaj ocene"<<endl;
  68.             cin>>ocena2;
  69.             ocenaf(ocena2);
  70.             break;
  71.         case 2:
  72.             plusf();
  73.             break;
  74.         case 3:
  75.             choinka();
  76.             break;
  77.         }
  78.     }while(wybor!=4);  
  79. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement