gdzie zrobiłam bląd, że dzielniki źle się sumują>
#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
int main()
{
char znak;
int z, x;
do {
x = 0;
cout << "Podaj numer z dziennika: ";
cin >> z;
for (int licznik = -100; licznik <= z; licznik++) {
if (licznik % z == 0) {
x = licznik + z;
cout << endl;
cout << licznik;
cout << " dzieli sie przez moj numer" << endl;
}
}
cout << "Suma: " << x << endl;
cout << "Czy chcesz dzielic ponownie? T/N: ";
cin >> znak;
}
while ((znak == 't') || (znak == 'T'));
return 0;
}