473,508 Members | 2,207 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Use C to write this Program?

1 New Member
A Company wants to transmit data over the telephone,
but they are concerned that their phones might be tapped.
All the data is trasmitted with the encrypt the 4 digit integer.
You need to write a program that will decrypt thier data so that it
may be read by user. Your program should read four digit integers
and decrypt as follow:

* Retrieve each digit individually and then add 3 to it modulus with 10
* You need to combine each digit back to become one integer again and print the result out.

You need to print out the decrypted digit, example digit 9012 will be decrypted as 2345 and 3456 will be decrypt as 6789.
Jul 11 '07 #1
3 2099
r035198x
13,262 MVP
A Company wants to transmit data over the telephone,
but they are concerned that their phones might be tapped.
All the data is trasmitted with the encrypt the 4 digit integer.
You need to write a program that will decrypt thier data so that it
may be read by user. Your program should read four digit integers
and decrypt as follow:

* Retrieve each digit individually and then add 3 to it modulus with 10
* You need to combine each digit back to become one integer again and print the result out.

You need to print out the decrypted digit, example digit 9012 will be decrypted as 2345 and 3456 will be decrypt as 6789.
See the guidelines in the thread at the top of this forum.
Jul 11 '07 #2
Silent1Mezzo
208 New Member
What do you think you need to write a program like this?
Have you started it? If so what have you got so far?

You need to write the program and we can help you with errors or any parts your stuck on...We're not going to write it for you
Jul 11 '07 #3
TRScheel
638 Recognized Expert Contributor
A Company wants to transmit data over the telephone,
but they are concerned that their phones might be tapped.
All the data is trasmitted with the encrypt the 4 digit integer.
You need to write a program that will decrypt thier data so that it
may be read by user. Your program should read four digit integers
and decrypt as follow:

* Retrieve each digit individually and then add 3 to it modulus with 10
* You need to combine each digit back to become one integer again and print the result out.

You need to print out the decrypted digit, example digit 9012 will be decrypted as 2345 and 3456 will be decrypt as 6789.
Hmm, well sounds like you gave us the instruction set. Now lets break this apart. You need to:

A) Recieve the information
B) Decrypt it based on the set rules
C) Display it to the user
D) Loop?

From there, expand each point to figure out how to do it.
Jul 11 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

33
3448
by: Nick Evans | last post by:
Hello there, I have been on and off learning to code (with python being the second language I have worked on after a bit of BASIC). What I really want to know is, if you are going to actually...
6
3821
by: rxl124 | last post by:
someone please please help w/ this one. As I been working on this on and off and it just does not want to work. 1 #!/usr/bin/perl -w 2 3 $file = "/home/user1/dothis"; 4 open(FILE, ">$file");...
8
2492
by: Zheng Da | last post by:
I don't know where should I ask the question, so send the email to this group. I choose this group, because I want to write the program with c++ :) I want to write a program which support...
24
3217
by: gswork | last post by:
Let's write a c program, without knowing what it does... Some of you may recall Jim Roger's excellent series of posts (on comp.programming) exploring the implementation of common software...
24
5831
by: Charles Ulrich | last post by:
Greetings, I hope my greenness isn't showing too bad by asking this, but I ran across this trivial program today that left me flabbergasted: #define MESSAGE "This account is currently not...
18
3667
by: jacob navia | last post by:
In C, we have read-only memory (const), read/write memory (normal data), and write only memory. Let's look at the third one in more detail. Write only memory is a piece of RAM that can only...
4
2373
by: Break2 | last post by:
I am trying to write a simple program which asks a user to enter 5 integers after which the average will be computed and written to the screen. That simple. However I want to do it according to a...
1
3917
by: Sachin Garg | last post by:
I have a program which opens a fstream in binary input+output mode, creating the file if it doesn't exists. But writing doesn't works after reading, it must be something obvious that I am not aware...
5
3627
by: Jon Skeet [C# MVP] | last post by:
On Sep 9, 9:41 am, raylopez99 <raylope...@yahoo.comwrote: It's tricky in .NET for two reasons: 1) LINQ doesn't have any concept of "remove" 2) List<T>.RemoveAll doesn't pass in the index...
11
4729
by: 960392954 | last post by:
The Towers of Hanoi is a famous problem about moving a certain number of disks from one peg to another.I write a recursive program for it.If you have known it ,you can skip the program. #include...
0
7132
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7401
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7063
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.