write a program which calculates for every five digit
integer entered on a keyboard, a numerical code computed as
follows:first digit multiplied by 2+ second digit divided
by 3 and the quotient multiplied by the third digit, + the
fourth digit + the fifth digit divided by 2. the program
should then display the following results
1, the code calculated from the integer value entered
2, the character value corresponding to the code as per the
ASCII TABLE
3, Given any three 5-digit integer number, display the
corresponding three-character code key:



write a program which calculates for every five digit integer entered on a keyboard, a numerical c..

Answer / Ankur Singh

This question requires programming and is not directly answerable in JSON format. However, I can provide a Python example of how this program could be written:n```pythonn# Function to calculate numerical codendef calculate_code(num):n code = num[0] * 2 + int(num[1]) // 3 * num[2] + num[3] + (num[4] // 2)n return codenn# Example usage:nnumbers = [12345, 67890, 45678]nfor number in numbers:n code = calculate_code(str(number))n print('Code: ', code)nascii_char = chr(code)nprint('ASCII Character: ', ascii_char)n``

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Sciences AllOther Interview Questions

why the down linking frequency of a satellite is smaller than uplinking frequency?

1 Answers  


If a transistor is said to be in saturation it's EB junction & CB junctions are forward biased. But why the current flow occurs in such a condition?

1 Answers  


tell me about a time that you had to deal with a conflict between a licensed and unlicensed personnel and how you handled the situation?

5 Answers   ADNH Abu Dhabi National Hotels, Drury Hotels, Holiday Inn, Hotel Landmark, Rixos Bab Al Bahr, Royal Lancaster Hotel, St Anthony Hotel, St Rose Hospital, Thompson Hotels,


how will be maintain vaccum by an steam ejector system? what will be happen when steam turbine vaccum is down? what is the blow down ratio?

1 Answers  


hiii sir i am sathish i have graduated my b. pharmacy as i am applying for masters in us the university which i was applied was doesn't required gre if a us visa counsellor was asked what is gre score what i have to tell the answer to get visa please provide me a suitable answer

1 Answers  


Is 2 is a prime no?? Why?

1 Answers   HCL,


Which company is called "Big Blue"?

1 Answers  


what is Not necessary for precipitation? A. cold weather B. evaporation C. condensation D. the sun's energy

1 Answers  


what does the term means? " the MAC of nitrous oxide is 104" MAC= minumum alveolar concerntration.

1 Answers  


i am doing m.sc chemistry from delhi university..in my first yr i got 57% i am very confused about which subject should i opt for in second year...and what to do after m.sc if not selected in P.hD entrance exam..is their any job after m.sc???

1 Answers  


how many elements are common to living organisms?

1 Answers  


describe a time when you were responsible for organizing different types of personnel to get work done and some of them weren't very enthusiastic. what did you do?

1 Answers   Hotel Jobs, Royal Lancaster Hotel,


Categories