Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C language programming please help! The cardinality of a decimal number is the total number of 1 digits in its conversion to binary. Given up

C language programming please help! The cardinality of a decimal number is the total number of 1 digits in its conversion to binary. Given up to 50 integers, perhaps long long integers, as input determine which cardinality value occurs most frequently in the data set. When multiple cardinality values occur most frequently then select the cardinality value with the largest decimal number.image text in transcribedimage text in transcribed

Problem: The cardinality of a decimal number is the total number of 1 digits in its conversion to binary. Given up to 50 integers, perhaps long long integers, as input determine which cardinality value occurs most frequently in the data set. When multiple cardinality values occur most frequently then select the cardinality value with the largest decimal number. Number BinaryCardinality Example Execution #1: 10 32 14 7 1010 100000 1110 Enter data set now: 10 32 7 14 -1 Most frequently occurring cardinality in data set:3 Example Execution #2: Enter data set now: 6 10 12 2 4 16 -1 Multiple cardinality values occur most frequently! Explanation: 2, 4, 16 have a cardinality of one 6, 10, 12 have a cardinality of two Largest integer in these two sets of three each is 16 Cardinality value 1 with a maximum decimal value of: 16 Example Execution #3: Enter data set now: 7 2 6412 19 14 10 16 -1 Multiple cardinality values occur most frequently! Explanation: 2, 4, 16 have a cardinality of one 6, 10, 12 have a cardinality of two 7, 14, 19 have a cardinality of three Largest integer in these three sets of three each is 19 Cardinality value 3 with a maximum decimal value of: 19 ''7, Example Execution #4: Enter data set now: 8223372036854775807 7223372036854775807 6223372036854775807 5223372036854775807 4223372036854 775807 3223372036854775807 2223372036854775807 1223372036854775807 -1 Most frequently occurring cardinality in data set: 39 Problem: The cardinality of a decimal number is the total number of 1 digits in its conversion to binary. Given up to 50 integers, perhaps long long integers, as input determine which cardinality value occurs most frequently in the data set. When multiple cardinality values occur most frequently then select the cardinality value with the largest decimal number. Number BinaryCardinality Example Execution #1: 10 32 14 7 1010 100000 1110 Enter data set now: 10 32 7 14 -1 Most frequently occurring cardinality in data set:3 Example Execution #2: Enter data set now: 6 10 12 2 4 16 -1 Multiple cardinality values occur most frequently! Explanation: 2, 4, 16 have a cardinality of one 6, 10, 12 have a cardinality of two Largest integer in these two sets of three each is 16 Cardinality value 1 with a maximum decimal value of: 16 Example Execution #3: Enter data set now: 7 2 6412 19 14 10 16 -1 Multiple cardinality values occur most frequently! Explanation: 2, 4, 16 have a cardinality of one 6, 10, 12 have a cardinality of two 7, 14, 19 have a cardinality of three Largest integer in these three sets of three each is 19 Cardinality value 3 with a maximum decimal value of: 19 ''7, Example Execution #4: Enter data set now: 8223372036854775807 7223372036854775807 6223372036854775807 5223372036854775807 4223372036854 775807 3223372036854775807 2223372036854775807 1223372036854775807 -1 Most frequently occurring cardinality in data set: 39

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions