Facebook
From Gentle Bee, 5 Years ago, written in Plain Text.
This paste is a reply to Untitled from Chocolate Lechwe - view diff
Embed
Download Paste or View Raw
Hits: 300
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4. int main() {
  5.  int d[0];
  6.  int l;
  7.  long int NWD;
  8.  fstream plik;
  9.  plik.open("liczby.txt");
  10.  if (!plik.good())
  11.   cout<<"brak pliku!";
  12. plik>>l;
  13. d[0]=l;
  14.  for(int i=1;i<=d[0];i++){
  15.         if(d[0]%i==0)
  16.         cout<<i<<" ";
  17.  }
  18.  
  19.  return 0;
  20. }