C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 7th, 2012, 08:46 AM
shone411 shone411 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 1 shone411 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 34 m 55 sec
Reputation Power: 0
Red face Lab Help

Write a Raptor program that reads text from a file and encodes the file by adding 5 to the ASCII value of each character.
Put a text file (such as plain.txt) in the same directory as your Raptor program. Look under advanced topics in the Raptor help system for information on reading and writing to files.
Your Raptor program should:
1.Read the text file one line at a time.
2.Change each character of the string by adding 5 to it.
3.Write the encoded string to a second file, such as plain.code
4.The encoded file should have the same structure as the original file, if the second line of the original file has 24 characters (including spaces) then there should be 24 characters on the second line of the encoded file (spaces will now look like '%').
Demonstrate your executable flowchart to your instructor. Print out and hand in your flowchart. Make sure your name is on the flowchart in a comment.
Once you have completed your flowchart, write a C++ program that reads text from a file and decodes the file by subtracting 5 from the ASCII value of each character. Note that the Raptor program will encode the file and the C++ program will decode it.
Put a coded file (such as plain.code) in the same directory as your C++ executable program. See chapter 12 in Starting out with C++ for information on reading and writing to text files.
Your C++ program should:
1.Read the text file one line at a time.
2.Change each character of the string by subtracting 5 from it.
3.Write the encoded string to a second file, such as plain2.txt

He gave me a sample input file- called as plain.txt which says in the file that This is a sample input file for COSC 1436 assignment #10. Your program should encode this
file by adding 5 to the AsCII value of each character in it.
In your encoded file the first character should be 'Y'. The
last character of the first line should be ';'. The encoded file should have 8 lines of text just like this one, but will be unreadable. The last character of the last line will be a '3'.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > Lab Help


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap