Facebook
From Gruff Parrot, 7 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 265
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.    double a,b;
  8.    cout << "Podaj zmienna a" << endl;
  9.    cin >> a;
  10.    cout << "Podaj zmienna b" << endl;
  11.    cin >> b;
  12.    if ( b!=0)
  13.  
  14.    cout << "Wynik= " << (a/b) * (a/b) << endl;
  15.    else
  16.    {
  17.        cout << "Nie dzielimy przez zero" << endl;
  18.    }
  19. }