Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- int main(int argc, char ** argv)
- {
- const int rsize = 1000;
- int randi[rsize];
- double randd[rsize];
- for (int i = 0; i < rsize; i++)
- {
- randi[rsize] = rand()*rand();
- randd[rsize] = double(randi[rsize]);
- }
- bool calcd = (argv[1][0] == 'd');
- bool calci = (argv[1][0] == 'i');
- rand();
- int ia = rand()*rand();
- int ib = rand()*rand();
- double da = (double)(ia);
- double db = (double)(db);
- double dc;
- int ic;
- for (int i = 0; i < 100000000; i++)
- {
- if (calcd)
- {
- ic = ia*ib; //randi[ i % rsize ] * randi[ (i+1) % rsize ];
- }
- if (calci)
- {
- dc = da*db; //randd[ i % rsize ] * randd[ (i+1) % rsize ];
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement