Advertisement
lewapkon

iloczyn10.cpp

Sep 24th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. //  Autor: Pawel Koniarski
  2. //  Data: 21 wrzesnia 2013 r.
  3. //  Problem: Oblicz iloczyn 10 liczb caล‚kowitych
  4. //  Plik: iloczyn10.cpp
  5.  
  6. #include <iostream>
  7.  
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12.     int i, d, iloczyn;
  13.  
  14.     iloczyn = 1;
  15.     cout << "Podaj 10 liczb calkowitych, ktorych iloczyn chcesz uzyskac: ";
  16.    
  17.     for(i = 0; i < 10; i++)
  18.     {
  19.         cin >> d;
  20.         iloczyn *= d;
  21.     }
  22.    
  23.  
  24.     cout << "\n\n" << iloczyn << "\n\n";
  25.     cin.sync();
  26.     cin.get();
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement