Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a;
  6. float b;
  7. cout<<"Podaj liczbę1: ";
  8. cin>>a;
  9. cout<<"Podaj liczbe2; ";
  10. cin>>b;
  11. if(b==0){
  12. cout<<"nie mozna dzielic przez 0"<<endl;
  13. }else {
  14.  
  15. float c=float(a)/b;
  16. cout<<"Wynik to: "<<c<<endl;
  17. }
  18.  
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement