#include #include using namespace std; void czysc(); double suma_liczb(double x); int main(int argc, char *argv[]){ double x=1; char y; while(true){ cout<<"Podaj liczbe x="; czysc(); cin>>x; if(x<=0){ break; } else { cout<<"Suma liczb od 1 do "<>y; czysc(); } } cout<<"Blad\nLiczba jest ujemna\n"; system("PAUSE"); } void czysc(){ system("cls"); } double suma_liczb(double x){ if(x>0) return suma_liczb(x-1)+x; else return 0; }