473,471 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

need some help............programmes r flying above my head

1 New Member
Enter a string(by the user) and encode it n then again decode it according to the digit entered by the user.........E.g.--String str = "123"
int entereddigit=5
so..............................encoding is--678 n decoding is---123
plz do help its urgent
Dec 3 '07 #1
3 1044
heat84
118 New Member
Can you write your code, when you are stuck , the experts will be glad to help.
Dec 3 '07 #2
JosAH
11,448 Recognized Expert MVP
Enter a string(by the user) and encode it n then again decode it according to the digit entered by the user.........E.g.--String str = "123"
int entereddigit=5
so..............................encoding is--678 n decoding is---123
plz do help its urgent
I understand you want to add the int value 5 (or any other digit value) to each
character in the String to be encoded?

kind regards,

Jos
Dec 3 '07 #3
dav3
94 New Member
Enter a string(by the user) and encode it n then again decode it according to the digit entered by the user.........E.g.--String str = "123"
int entereddigit=5
so..............................encoding is--678 n decoding is---123
plz do help its urgent
Well your going to need 2 functions. An encoding function and a decoding function. You are going to have to find a way to add an integer to a string (using scanner class to get the user input might help you on this).

Your encode function you are obviously adding 5 to each character in the string, so your decode function will naturally do the opposite (subtraction).
Dec 3 '07 #4

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

Similar topics

21
by: Chris Reedy | last post by:
For everyone - Apologies for the length of this message. If you don't want to look at the long example, you can skip to the end of the message. And for the Python gurus among you, if you can...
3
by: Hemant | last post by:
Hi all, I am very new to this HTML/JAVA environment. I am having some doubts please answer them ASAP. I want to run an executable from the browser iteself, without "Save" or "Open" and "Security...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
1
by: aler45dcom | last post by:
I write a flying text script,but it sinks at the bottom and it stays there forever. How to change it so that it flies in the webpage? <html> <head> <title>Flying text</title> <script...
13
by: na1paj | last post by:
here's a simple linked list program. the DeleteNode function is producing an infinit loop i think, but i can't figure out where.. #include <stdio.h> typedef struct { char *str; //str is a...
22
by: Dave Cooke | last post by:
Hi I am very new to C. I am trying to figure out how to initialize a struct in my main program. The struct is declared in anouther header file like this... typedef struct ln { int key; int data;...
4
by: tobyjug01 | last post by:
yDespite numerous attempts to rectify this 'fault' any programmes i install just go into the Programmes folder, BUT NOT into the Add/Remove Programmes in Control Panel, therefore if i download a...
0
by: U S Contractors Offering Service A Non-profit | last post by:
Brilliant technology helping those most in need Inbox Reply U S Contractors Offering Service A Non-profit show details 10:37 pm (1 hour ago) Brilliant technology helping those most in need ...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
1
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
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.