// MAT 4970
//
// File:   ab.cm
// Author: Bill Slough
// 
// Purpose: This program creates two processes, A and B. 
//

const int TRIALS = 20;

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

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

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