Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. #include <math.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4. #include <iostream>
  5. using namespace std;
  6.  
  7. int main () {
  8. // Local variable declaration:
  9. char a, b, c, abc, f, g;
  10.  
  11. srand(time(0));
  12.  
  13. // do loop execution
  14. do {
  15. a='a' + rand()%7;
  16. b='b' + rand()%7;
  17. c='c' + rand()%7;
  18. cout<<"abc= "<<a<<b<<c<<endl;
  19. } while( a!=f || b!=a || c!=g );
  20. if(a!=f || b!=a || c!=g)
  21.  
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement