Facebook
From Harmless Panda, 6 Years ago, written in C++.
Embed
Download Paste or View Raw
Hits: 265
  1. void Dodaj(int nWartosc1, int nWartosc2)
  2. {
  3. int nWynik = nWartosc1 + nWartosc2;
  4.  std::cout << nWartosc1 << " + " << nWartosc2 << " = " << nWynik;
  5.  std::cout << std::endl;
  6. }
  7. int main()
  8. {
  9. int nLiczba1;
  10.  std::cout << "Podaj pierwsza liczbe: ";
  11.  std::cin >> nLiczba1;
  12. int nLiczba2;
  13.  std::cout << "Podaj druga liczbe: ";
  14.  std::cin >> nLiczba2;
  15.  Dodaj (nLiczba1, nLiczba2);
  16.  getch();
  17. }