All pastes #410421 Raw Edit

Miscellany

public text v1 · immutable
#410421 ·published 2007-03-26 11:47 UTC
rendered paste body
#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int x, o=0, pocz, kon;
    cout << "podaj zakres liczb" ; cin >> pocz >> kon;
    for(int k=pocz;k<=kon;k++){
   
    for(int i=1;i<=k/2;i++){
            if((k%i)==0){
            cout << i << " ";
            o++; }        
            else continue;
            if (i==k/2)
                cout << "dzielnikow jest " << o << endl;
                else continue;
            }
            
}
//else cout << "druga liczba musi byc wieksza od pierwszej" << endl;
    system("PAUSE");
    return EXIT_SUCCESS;
}