Beispiel #1
0
int main()
{
    
    scanf("%d",&t);
while(t--)
{     flag=0;
     scanf("%f",&n);
     scanf("%d%d%d",&a[1],&a[2],&a[3]);
     for(i=9;i>=1;i--)
     {
         for(j=9;j>=0;j--)
             {
     a[0]=i;
     a[4]=j;
     price=(a[0]*10000)+(a[1]*1000)+(a[2]*100)+(a[3]*10)+a[4];
     
     if(!testfloat(price/n))
     {
   z=price/n;
    printf("%d %d %d\n",i,j,z);
    flag=1;
    break;
     }
              }
     if(flag==1)
     break;
     }
     if(flag==0)
     printf("0\n");
}
              
              
    return 0;
}
Beispiel #2
0
int main (int argc, char **argv)
{
	/* These file formats support floating-point audio data. */
	int	fileFormatCount = 4;
	int	fileFormats[] =
		{AF_FILE_AIFFC, AF_FILE_WAVE, AF_FILE_NEXTSND, AF_FILE_IRCAM};
	char	*formatNames[] = {"AIFF-C", "WAVE", "NeXT .snd", "IRCAM"};
	int	i;

	for (i=0; i<fileFormatCount; i++)
	{
		printf("testfloat: testing %s\n", formatNames[i]);
		testfloat(fileFormats[i]);
	}

	printf("testfloat passed\n");
	exit(EXIT_SUCCESS);
}