// MAT 4970
//
// File:   abaa.cm
// Author: Bill Slough
// 
// Purpose: This program creates four processes, but they are not serialized. 
//

const int TRIALS = 20;

void A() {
   cout << "A";
}

void B() {
   cout << "B";
}

void main() {
    int i;
    for (i = 0; i < TRIALS; i++) {
       // Start four concurrent processes
       cobegin {
           A();
	   A();
	   A();
	   B();
       }
       cout << endl;
    }
 }
