Want more features on Pastebin? Sign Up, it's FREE!
Guest

objetosc szescianu

By: freeye on Nov 21st, 2012  |  syntax: None  |  size: 0.65 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <iostream>
  2. #include <conio.h>
  3. using namespace std;
  4. int main()
  5. {
  6. int a,b,c,v;
  7. cout<<"PROGRAM DO LICZENIA OBJETOSCI SZESCIANU"<<endl<<endl;
  8. cout<<"wpisz bok a: ";cin>>a;
  9. cout<<"wpisz bok b: ";cin>>b;
  10. cout<<"wpisz bok c: ";cin>>c;cout<<endl;
  11. v=a*b*c;
  12. if(a<0)
  13. {
  14. cout<<"nie ma danego szescianu"<<endl;
  15. getch();
  16. return 0;
  17. }
  18. else if(c<0)
  19. {
  20. cout<<"nie ma danego szescianu"<<endl;
  21. getch();
  22. return 0;
  23. }
  24. else if(b<0)
  25. {
  26. cout<<"nie ma danego szescianu"<<endl;
  27. getch();
  28. return 0;
  29. }
  30. else if(v<0)
  31. {
  32. cout<<"nie ma danego szescianu"<<endl;
  33. getch();
  34. return 0;
  35. }
  36. cout<<"objetosc tego szescianu wynosi: "<<v<<endl;
  37. getch();
  38. return 0;
  39. }
clone this paste RAW Paste Data