Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <ctime>
- #include <cstdlib>
- using namespace std;
- int main()
- {
- int a[10];
- int b =0;
- do
- {
- srand( time (NULL));
- cout << "losuje... " << ((rand()%7)+4) <<endl;
- b++;
- }while(b<10);
- cout << "teraz zsumujemy je..." << endl;
- b=0;
- do
- {
- cout << (a[b] + a[b++]);
- }while(b<10);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement