Another C - Program is to be written

This is a discussion on Another C - Program is to be written within the C Programming forums, part of the General Programming Boards category; Write a C - program that will encrypt a given text in the following manner. For each line of text ...

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    2

    Thumbs down Another C - Program is to be written

    Write a C - program that will encrypt a given text in the following manner. For each line of text
    i) Convert each character to ASCII equivalents
    ii) Generate a positive random integer
    iii) Add the integer to ASCII value of each character
    iv) Let A1 denote lowest permissible value in ASCII code & A2 donate highest permissible value in ASCII code. If the integer generated in step iii, exceed A2, then subtract A2 from the integer & add A1 to the remainder, ensuring that the number will remain between A1 and A2. and
    v) Write out the encryted character.

    I'll be highly oblized for the kind help of your's.
    Anupam

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,699
    No offense, but where's your code, Mr. Programmer?
    Code:
    bool fun(bool value)
    {
        return std::pow(std::exp(1), std::complex<float>(0, 1) 
        * std::complex<float>(std::atan(1)*(1 << (value + 2))))
        .real() > 0;
    }

  3. #3
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    What exactly are you stuck with. Your instructions seem simple enough.
    One word of advice is that unless you post some code of your own to show that you have at least had a good go at this on your own you will get little or no help here.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. large program code ,please help
    By Ash1981 in forum C Programming
    Replies: 14
    Last Post: 01-30-2006, 05:16 AM
  2. Inserting text into MDI program
    By Rutabega in forum Windows Programming
    Replies: 0
    Last Post: 12-23-2005, 10:25 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. matrix program written in c++
    By boa_321 in forum C++ Programming
    Replies: 2
    Last Post: 02-03-2003, 08:33 AM
  5. redirection program help needed??
    By Unregistered in forum Linux Programming
    Replies: 0
    Last Post: 04-17-2002, 05:50 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21