Hello! I am a first year student in Cybernetics. I went to this college because I wanted to learn a lot of IT, Programming and all that. We do courses and labs in English (I don't live in an English-speaking country). The problem is that our C Programming teacher has little to no knowledge in English, yet she still tries to speak it and refuses to use out mother-tongue to actually teach us something. So we basically don't understand anything that she's saying and the textbooks jump straight into difficult stuff and we don't have the knowledge to do them.
Anyway, I have an exam coming up on Friday and she gave us a list of programs that we need to know in order to be able to pass the exam. I have managed to find a solution for the first one (arithmetic mean) and learn and understand it but I am having a difficult time finding a solution for the others. If any one of you has the time or has a few examples for either of them that you would like to share, I would really appreciate it. Here is the list she gave us:
List of programs for the final examination:
-Arithmetical and geometrical means
-intersection and reunion of two vectors
-Interclasarea
-Value of a polynomial in a point
-find a value and all positions of that value in a vector
-find a value using binary search
-min and max in all positions
-product of two matrices
-product of a matrtix with a vector and a product of a vector with a matrix
-main diagonal and secondary diagonal above and below
-the sum of all triangles
-find the vectorial product of every two lines/columns
-find the vectorial of two by two
-calculate using a subprogram the number of positive numbers of each columns in a matrix
-find a line in which all the elements are positive/negative
I did the first one (arithmetic mean) like this and it worked, but I also need the others. I promise you this is not homework or work, I just need them for study purposes.
Code:
#include <stdio.h>
#include <conio.h>
void main()
{
int n, i;
float a[100], AM, sum = 0;
printf("Please enter the number of terms \n");
scanf("%d", &n);
printf("Please assign a value to the %d terms \n", n);
for (i = 1; i <= n; i++)
{
scanf("%f", &a[i]);
sum += a[i];
}
AM = sum / n;
printf("The arithmetic mean is = %f", AM);
getch();
}
Thank you!