int main() { int length=20; char boyname[20], girlname[20]; /* char *boyname, *girlname; boyname = malloc(sizeof(char)*length); girlname = malloc(sizeof(char)*length); if(boyname == NULL && girlname ==NULL) { printf("memory not allocatedThis is bull shit\n"); exit(0); } */ printf("girl's first: "); fgets(girlname, 20, stdin); //printf("%s\n", girlname); //scanf("%s", girlname); printf("wats up guys: "); fgets(boyname, 20, stdin); //printf("%s\n", boyname); //scanf("%s", boyname); length = mcc(girlname, boyname); printf("The matching char count is : %d\n", length); flames(length); //printf("The relationship between %s and %s is %s\n", flames(mcc(girlname,boyname))); }
void WorkThread::run() { /*********************************************************/ /* Read input file, and initialize params and vars. This */ /* function calls SPECIES and LOAD or Restore */ start_(argc, argv); // init output file QString filename = "Qdust(t).txt"; QFile file(filename); // InitWindows(argc, argv); history(); fields(); int step=0; float *pot = phi; if (file.open(QIODevice::WriteOnly)) { QTextStream stream(&file); stream.setRealNumberPrecision(20); while(True) { if(!stop){ // mutex.lock(); t += dt; move(); adjust(); mcc(); fields(); history(); if(((int)(t/dt))%2==0) stream << t<<"\t"<< qdust << "\t"<< energy_flux[0] <<"\t"<< energy_flux[1] << endl; updatePlasmaModel(); if(step%200==0 && step>0) { // stop=true; std::cout<< "Step "<<step<<": a signal sent to save data\n"<<endl; emit DataChanged(); } } else{ this->msleep(50); } step++; } } }
int main ( ) { int t, n, m, i; int blocks[26]; scanf ( "%d", &t ); while ( t-- ) { scanf ( "%d %d", &n, &m ); for ( i = 0; i < n; i++ ) scanf ( "%d", &blocks[i] ); printf ( "%d", mcc( blocks, n, m ) ); puts ( "" ); } return 0; }