Facebook
From ja, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 225
  1. #include <iostream>
  2. using namespace std;
  3. int main(void){
  4.   float x, y;
  5.   cout<<"x = ";
  6.   cin>>x;
  7.   cout<<"y = ";
  8.   cin>>y;
  9.   if(y==0)
  10.     cout<<"Nie mozna dzielic przez 0";
  11.   else{
  12.     float z;
  13.     z=x/y;
  14.     cout<<"z = "<<z;
  15.   };
  16.   cout<<endl;
  17.   char c;
  18.   cin>>c;
  19. }