Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include <stdlib.h>
- #include <cstdlib>
- #include <time.h>
- using namespace std;
- int main()
- {
- int losowanie999 [ 999 ];
- int i = 0;
- srand( time (NULL));
- do{
- losowanie999 [ i ] = (rand() % 7) + 4;
- i++;
- }while(i < 999);
- i = 0;
- cout << "Wylosowane liczby: " << endl;
- do{
- cout << losowanie999[ i ] << ", ";
- i++;
- }while(i < 999);
- int suma = 0;
- for(int o = 0; o < 999; o++){
- suma += losowanie999[o];
- }
- cout << "Wynik dodawania: " << suma << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement