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
How can I delete a file?
write a program to produce the following output; ABCDEFGFEDCBA ABCDEF FEDCBA ABCDE EDCBA ABCD DCBA ABC CBA AB BA A A
17 Answers ABC, College School Exams Tests,
what does ‘segmentation violation’ mean?
Write a program to accept a character & display its corrosponding ASCII value & vice versa?
which operator is known as dummy operator in c?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
When can you use a pointer with a function?
#include<stdio.h> void main() { int a=5,b=6,c; int x=(a<b)+7; int y=(x==7)*9; int z=(c=x+y)*2; printf("%h %h %h",x,y,z); } What is the output? Explain it.
helllo sir , what is the main use of the pointer ,array ,and the structure with the example of a programe
How can I set an array's size at run time?
main() { int a[10]; printf("%d",*a+1-*a+3); }
what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"); } why it gives the value of third variable.