Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <cstdlib>
- #include <ctime>
- using namespace std;
- int main()
- {
- int i = 0;
- char a[10];
- cin >> i;
- srand(time(NULL));
- for (int x = 0;x < 10;x++)
- {
- a[x] = rand() % i;
- }
- cout << a[0] + a[1] + a[2] + a[3] + a[4] + a[5] +a[6] + a[7] + a[8] + a[9] + a[10];
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment