All pastes #823829 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2007-12-19 16:45 UTC
rendered paste body
#include <stdio.h>#include <stdlib.h>#include <iostream>using namespace std;//*znalezc taka liczbę ze przy dzieleniu przez 10 zwraca reszte 9, przy dzieleniu przez 9 zwraca reszte 8 itd.*/int main(){int m;    cout <<"start\n";    for(int i=9;i<=100000;i=i+10)    {m=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;                                                                                                                                                                                       }                                                                                }                                                                        }                                                                }                                                        }                                                }                                        }                                }                        }    }    }