#include <stdio.h>
int main( ) {
float arr[ 10 ] ;
int i, j;
int hasDuplicates = 0 ;
printf ( "Enter 10 float values:\n " ) ; for ( i = 0 ; i < 10 ; i++ ) {
}
for ( i = 0 ; i < 9 ; i++ ) {
for ( j = i + 1 ; j < 10 ; j++ ) {
if ( arr[ i] == arr[ j] ) {
hasDuplicates = 1 ;
break ;
}
}
if ( hasDuplicates) {
break ;
}
}
if ( hasDuplicates) {
printf ( "There are duplicate values in the array.\n " ) ; } else {
printf ( "There are no duplicate values in the array.\n " ) ; }
return 0 ;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CmludCBtYWluKCkgewogICAgZmxvYXQgYXJyWzEwXTsKICAgIGludCBpLCBqOwogICAgaW50IGhhc0R1cGxpY2F0ZXMgPSAwOwoKICAgIHByaW50ZigiRW50ZXIgMTAgZmxvYXQgdmFsdWVzOlxuIik7CiAgICBmb3IgKGkgPSAwOyBpIDwgMTA7IGkrKykgewogICAgICAgIHByaW50ZigiVmFsdWUgJWQ6ICIsIGkgKyAxKTsKICAgICAgICBzY2FuZigiJWYiLCAmYXJyW2ldKTsKICAgIH0KCiAgICBmb3IgKGkgPSAwOyBpIDwgOTsgaSsrKSB7CiAgICAgICAgZm9yIChqID0gaSArIDE7IGogPCAxMDsgaisrKSB7CiAgICAgICAgICAgIGlmIChhcnJbaV0gPT0gYXJyW2pdKSB7CiAgICAgICAgICAgICAgICBoYXNEdXBsaWNhdGVzID0gMTsKICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGlmIChoYXNEdXBsaWNhdGVzKSB7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgIH0KCiAgICBpZiAoaGFzRHVwbGljYXRlcykgewogICAgICAgIHByaW50ZigiVGhlcmUgYXJlIGR1cGxpY2F0ZSB2YWx1ZXMgaW4gdGhlIGFycmF5LlxuIik7CiAgICB9IGVsc2UgewogICAgICAgIHByaW50ZigiVGhlcmUgYXJlIG5vIGR1cGxpY2F0ZSB2YWx1ZXMgaW4gdGhlIGFycmF5LlxuIik7CiAgICB9CgogICAgcmV0dXJuIDA7Cn0=