A banker has a seif with a cipher. Not to forget the cipher, he wants to write it coded as following: each digit to be replaced with the difference of 9 with the current digit. The banker chose a cipher. Decipher it knowing the cipher starts with a digit different than 9.
I need to write a program that takes the cipher from the keyboard and prints the new cipher.
I thought of the following:
Take the input from the keyboard and put it into a string or an array.
Go through the object with a for and for each digit other than the first, substract it from 9 and add it to another variable.
Print the new variable.
Theoretically I thought of it but I don't know much C. Could you give me any kind of hint, whether I am on the right track or not?
No Answer is Posted For this Question
Be the First to Post Answer
difference between spiral and waterfall model
main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }
main() { int i; printf("%d", &i)+1; scanf("%d", i)-1; }
Differentiate Source Codes from Object Codes
write a c prog for removing duplicate character from an array and sorting remaining elements using a single array
How to explain the final year project as a fresher please answer with sample project
Can a pointer be static?
errors in computer programmes are called
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
How can I access a memory located at certain address?
What are logical errors and how does it differ from syntax errors?
How to write a C program to determine the smallest among three nos using conditional operator?