Advertisement
Guest User

Untitled

a guest
Dec 5th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. // re.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <cstdlib>
  7. #include <ctime>
  8.  
  9. using namespace std;
  10. void funkcia01 (int a[13], int i)
  11. {
  12.  
  13.  
  14. for(i = 0; i < 13; i++)
  15. {
  16.  
  17. srand((unsigned int)time(NULL));
  18.  
  19. for(i = 0; i < 13; i++)
  20. {
  21. a[i] = rand()% 100;
  22. }
  23.  
  24. }
  25. cout << "Vypis za sebou: " << endl;
  26.  
  27. for (i = 0; i < 13; i++)
  28. {
  29. cout << a[i] << " ";
  30.  
  31. }
  32. }
  33.  
  34. int _tmain(int argc, _TCHAR* argv[])
  35. {
  36. int a[13];
  37. int i = 0;
  38.  
  39. cout << "13 nahodne zadanych cisel vypisanych v riadku oddelene medzerou *funkcia01*: " << endl;
  40. funkcia01(a, i);
  41.  
  42.  
  43.  
  44. system("Pause");
  45. return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement