#include <stdio.h>
int main( ) {
float arr[ 10 ] ;
int i, j;
int hasDuplicates = 0 ;
// Input 10 float values from the user
printf ( "Enter 10 float values:\n " ) ; for ( i = 0 ; i < 10 ; i++ ) {
}
// Check for duplicates
for ( i = 0 ; i < 9 ; i++ ) {
for ( j = i + 1 ; j < 10 ; j++ ) {
if ( arr[ i] == arr[ j] ) {
hasDuplicates = 1 ;
break ;
}
}
if ( hasDuplicates) {
break ;
}
}
// Output result
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+CmludCBtYWluKCkgewogICAgZmxvYXQgYXJyWzEwXTsKICAgIGludCBpLCBqOwogICAgaW50IGhhc0R1cGxpY2F0ZXMgPSAwOwoKICAgIC8vIElucHV0IDEwIGZsb2F0IHZhbHVlcyBmcm9tIHRoZSB1c2VyCiAgICBwcmludGYoIkVudGVyIDEwIGZsb2F0IHZhbHVlczpcbiIpOwogICAgZm9yIChpID0gMDsgaSA8IDEwOyBpKyspIHsKICAgICAgICBwcmludGYoIlZhbHVlICVkOiAiLCBpICsgMSk7CiAgICAgICAgc2NhbmYoIiVmIiwgJmFycltpXSk7CiAgICB9CgogICAgLy8gQ2hlY2sgZm9yIGR1cGxpY2F0ZXMKICAgIGZvciAoaSA9IDA7IGkgPCA5OyBpKyspIHsKICAgICAgICBmb3IgKGogPSBpICsgMTsgaiA8IDEwOyBqKyspIHsKICAgICAgICAgICAgaWYgKGFycltpXSA9PSBhcnJbal0pIHsKICAgICAgICAgICAgICAgIGhhc0R1cGxpY2F0ZXMgPSAxOwogICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgaWYgKGhhc0R1cGxpY2F0ZXMpIHsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgfQoKICAgIC8vIE91dHB1dCByZXN1bHQKICAgIGlmIChoYXNEdXBsaWNhdGVzKSB7CiAgICAgICAgcHJpbnRmKCJUaGVyZSBhcmUgZHVwbGljYXRlIHZhbHVlcyBpbiB0aGUgYXJyYXkuXG4iKTsKICAgIH0gZWxzZSB7CiAgICAgICAgcHJpbnRmKCJUaGVyZSBhcmUgbm8gZHVwbGljYXRlIHZhbHVlcyBpbiB0aGUgYXJyYXkuXG4iKTsKICAgIH0KCiAgICByZXR1cm4gMDsKfQ==