Thread: turbo c++ user

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Jul 2007
    Location
    manila, PI
    Posts
    2

    turbo c++ user

    hi everyone. im here to ask everyone's help. im a student, enrolled in a turbo c++ subject.
    PLEASE help me answer my PROJECT...please, please...here are the programs, i need codes of it.

    a.)

    Write a function PerimeterMinusCenter that take in a two-dimensional array called intarr of 3 rows and 3 columns. The function sums the values in the perimeter of the array. It then returns the difference of this sum and the center value (the value in cell row 1,column 1).

    For example, if
    Code:
    intarr(3)(3) ={	{1,1,1},   {1,2,1},   {1,1,1}};
    PerimeterMinusCenter (intarr) returns 6 (1+1+1+1+1+1+1+1 - 2)).



    b.)

    Write a function Compare that take in a two-dimensional array called intarr of 3 rows and 3 columns. The function sums up separately the values in the diagonal of the array and the non-diagonal values. It then compares these two sums and return 1 if the diagonal sum is larger than the non-diagonal sum and 0 otherwise.

    For example, if
    Code:
    intarr(3)(3) ={	{1,2,2},	{2,1,2},	{2,2,1}};
    Compare (intarr) returns 0 (since (1+1+1) < (2+2+2+2+2+2)).

    c.)

    Write a recursive function called CountEvenASCII that takes in a string parameter str and return the number of characters with even ASCII codes. For example CountEvenASCII("ABCDE") returns 2 (as B and D are of even ASCII codes).

    d.)

    Change your solution above into an iterative solution.


    HELP will be very much appreciated...thank you guys, i hope atleast one can help me out here...
    Last edited by Salem; 07-08-2007 at 10:20 AM. Reason: fix tag abuse

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 04-03-2008, 09:07 PM
  2. Add/Delete Remotely a user
    By Scarvenger in forum Windows Programming
    Replies: 5
    Last Post: 03-24-2008, 08:36 AM
  3. Replies: 4
    Last Post: 04-21-2004, 04:18 PM
  4. ~ User Input script help~
    By indy in forum C Programming
    Replies: 4
    Last Post: 12-02-2003, 06:01 AM
  5. Stopping a user from typeing.
    By knave in forum C++ Programming
    Replies: 4
    Last Post: 09-10-2001, 12:21 PM