Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <math.h>
- #include <stdlib.h>
- #include <time.h>
- #include <iostream>
- using namespace std;
- int main () {
- // Local variable declaration:
- char a, b, c, abc, f, g;
- srand(time(0));
- // do loop execution
- do {
- a='a' + rand()%7;
- b='b' + rand()%7;
- c='c' + rand()%7;
- cout<<"abc= "<<a<<b<<c<<endl;
- } while( a!=f || b!=a || c!=g );
- if(a!=f || b!=a || c!=g)
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement