Advertisement
lukii1231

JAkis tam program, void, alfabet, pola

Feb 27th, 2020
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. void Alfabet();
  4. float PoleRombu();
  5. int e,f;
  6. char i;
  7. int main(){
  8. int wybor;
  9. char i;
  10.  
  11. cout<<"Co chcesz robić? 1-PoleRombu, 2-Alfabet";
  12. cin>>wybor;
  13. switch(wybor){
  14.  
  15. case 1:
  16. cout<<"Pole rombu wynosi"<<PoleRombu()<<endl;
  17. break;
  18. case 2:
  19. cout<<"Alfabet: "<<Alfabet<<endl;
  20. break;
  21.  
  22. default:
  23. cout<<"Koniec";
  24. break;
  25.  
  26. }
  27.  
  28.  
  29.  
  30. return 0;
  31. }
  32. float PoleRombu(){
  33. int e,f;
  34. cout<<"Podaj Pierwsza przekatna ";
  35. cin>>e;
  36. cout<<"Podaj Drugą przekątną ";
  37. cin>>f;
  38. return e*f/2;
  39. }
  40.  
  41. void Alfabet (){
  42. char i;
  43. cout<<"Wybierz litere od której zaczne alfabet";
  44. cin>>i;
  45.  
  46. cout<<i<<endl;
  47.  
  48. return;
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement