adspace


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:

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Any one regarding result of NIC(National Informatices Centre) interview for SB Programmer?

2462


i am mathematics student. i have selected on sbi cerck on20 oct.ple any one before me has exp of PI ple help me waht they ask in PI.and what about mathematics ques ple contact on shahkr786@gmail.com

2235


plz send me sylyabus model quetion paper for drug inspector exam

2034


generate a program to find the next date

2216