示例#1
0
int main(){
	freopen("questao11.in","r",stdin);
	freopen("questao11.out","w",stdout);


	while(ler_dados()){
		processa();
	}

	return 0;
}
示例#2
0
int main(){
	freopen("questao4.in","r",stdin);
	freopen("questao4.out","w",stdout);

	printf("Estes numeros fazem parte da sequencia de fibonacci: \n");
	while(ler_dados()){
		processa();
	}
	
	return 0;


}
示例#3
0
文件: refresh.c 项目: ataliba/codes
void refresh(char *name, char *alvo){
  char *buf, *ptr, *ptr2, *tmp;
  FILE *target;

  if(name == NULL)
    return;

  if(alvo == NULL)
    target = stdout;
  else
    target = Fopen(alvo, "w");

  ptr = buf = pega(name);

  while(1){
    if(*ptr == '<'){
      if(++ptr == '\0')
        break;
      else
      if(ptr == strstr(ptr, "hts")){

        ptr2 = ptr + strlen("hts");
        ptr = tags(ptr2);
        if(ptr++ == NULL)
          Erro(">");

        tmp = Malloc(ptr - ptr2);
        strncpy(tmp, ptr2, ptr - ptr2 - 1);
        processa(tmp, target);
      }
      else fputc('<', target);
    }
    if(*ptr == '\0') break;
    fputc(*(ptr++), target);
  }

  if(target != stdout)
    fclose(target);
  free(buf);
}
示例#4
0
QVector<Quadric2D> fittingGSL(const QMatrix4x4& inv, const QVector<QVector2D>& inpoints)
{
    if(inpoints.size() < MINIMUM)
    {
        QVector<Quadric2D> qs ;
        qs.push_back( ZERO ) ;
        qs.push_back( ZERO ) ;
        qs.push_back( ZERO ) ;
        return qs;
    }

    n = inpoints.size();
    points[0] = new real[n];
    points[1] = new real[n];

    for(int i = 0; i < n; ++i)
    {
        points[0][i] = inpoints[i].x();
        points[1][i] = inpoints[i].y();
    }

    return processa(inv);
}