Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #include <time.h>
- using namespace std;
- void losowanie3(){
- int x, suma=0;
- srand(time(NULL));
- for(int i=1; i<=100; i++){
- x=rand()%11+10;
- cout<<x<<endl;
- suma += x;
- }
- cout<<"Suma="<<suma;
- }
- int main()
- {
- losowanie3();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment