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...