Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <iostream>
- using namespace std;
- int main()
- {
- int suma, c, b, z;
- srand( time( NULL ) );
- z=(rand()%100);
- cout<<"Podaj liczbe przez ktora chcesz dzielic: ";
- cin>>b;
- cout<<"Podaj zakres: ";
- for (c=0; c<=z; c++)
- {
- if(c%b!=0)
- {
- suma=suma+c;
- cout<<c<<endl;
- }
- }
- cout<<suma;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement