using namespace std;
double power(int x,int n)
int a; int b;
cout<<"enter the base :";
cout<<"enter the exp :";
rose_2: While your enthusiasm for answering the question is commendable, it is generally considered a poor practice to provide outright answers to problems when the OP hasn't demonstrated that they had already made a good-faith effort to solve the problem before posting here - it encourages cheating, or at least a lack of effort, and does little to actually help the students learn to program.
This can be a fine line at times - one I and most of the other regulars have inadvertently crossed at one time or another - but this particular instance is clear-cut: the OP basically posted their problem set without any indication that they had done any work on it themselves, for an assignment that shouldn't have required more than a token effort to solve.
gencc: Seriously, you needed to even consider this? You probably could have done it yourself in less time than it took to post the question, and yet you felt you needed to beg for a hand-out? This is a sign of a student who belongs in a different major, or maybe out of college entirely. If I knew who your professor was, I would e-mail them a link to this thread straight away and let the consequences fall on you for your lack of academic honesty.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...