All pastes #823518 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2007-12-19 12:53 UTC
rendered paste body
#include <cstdlib>#include <iostream>#include <conio.h>using namespace std;int i, z;float m;/*znalezc taka liczbę ze przy dzieleniu przez 10 zwraca reszte 9, przy dzieleniu przez 9 zwraca reszte 8 itd.*/int main(){    cout <<"start\n";    for(i=9;i<=100000;i++)    {                        m=i%10;                        i=i+10;                        if(m==9)                        {                                m=i%9;                                if(m==8)                                {                                        m=i%8;                                        if(m==7)                                        {                                                m=i%7;                                                if(m==6)                                                {                                                        m=i%6;                                                        if(m==5)                                                        {                                                                m=i%5;                                                                if(m==4)                                                                {                                                                        m=i%4;                                                                        if(m==3)                                                                        {                                                                                m=i%3;                                                                                if(m==2)                                                                                {                                                                                        m=i%2;                                                                                        if(m==1)                                                                                        {                                                                                                cout <<"liczba spelniajaca ";                                                                                                 cout <<"warunki zadania: ";                                                                                                  cout << i << endl;                                                                                                break;                                                                                        }                                                                                }                                                                        }                                                                }                                                        }                                                }                                        }                                }                        }    }    cout <<"stop";    getch();    }