Advertisement
Guest User

Untitled

a guest
Mar 28th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include<iostream>
  3. #include<time.h>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9.     int i;
  10.     int f;
  11.     int s;
  12.    
  13.     i = rand() % 90 + 10;
  14.     int desetice;
  15.     int jedinice;
  16.     desetice = i / 10;
  17.     jedinice = i % 10;
  18.     cout << i << endl;
  19.     cout << desetice << " " << jedinice << endl;
  20.  
  21.     f = rand() % 90 + 10;
  22.     int desetice1;
  23.     int jedinice1;
  24.     desetice1 = i / 10;
  25.     jedinice1 = i % 10;
  26.     cout << f << endl;
  27.     cout << desetice1 << " " << jedinice1 << endl;
  28.     s = jedinice + jedinice1;
  29.     cout << s << endl;
  30.     system("pause");
  31.     return 0;
  32.    
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement