Answer:
a. engranaje 1 → engranaje 2 → engranaje 3 → engranaje 4
z1 = 10 z2 = 20 z3 =10 z4 = 20
b. n2 = 600 rpm, n3 = 1200 rpm, n4 = 600 rpm
la relacion de transmision = 2
Explanation:
where z1 = 10, z2 = 20, z3 = 10, z4 = 20
and n1 = 1200 rpm
n2 = n1 * z1/z2 = (1200 * 10)/ 20 = 600 rpm
n3 = n2 * z2/z3 = (600 * 20)/ 10 = 1200 rpm
n4 = n3 * z3/z4 = (1200 * 10)/ 20 = 600 rpm
la relacion de transmision = z2/z1 * z3/z2 * z4/z3
= 20/10 * 10/20 * 20/10 = 2 * 0.5 * 2 = 2
Answer:
To do this you'll need to use malloc to assign memory to the pointers used. You'll also need to use free to unassign that memory at the end of the program using the free. Both of these are in stdlib.h.
#include <stdlib.h>
#include <stdio.h>
#define SIZE_X 3
#define SIZE_Y 4
int main(void){
int **matrix, i, j;
// allocate the memory
matrix = (int**)malloc(SIZE_X * sizeof(int*));
for(i = 0; i < SIZE_X; i++){
matrix[i] = (int *)malloc(SIZE_Y * sizeof(int));
}
// assign the values
for(i = 0; i < SIZE_X; i++){
for(j = 0; j < SIZE_Y; j++){
matrix[i][j] = SIZE_Y * i + j + 1;
}
}
// print it out
for(i = 0; i < SIZE_X; i++){
for(j = 0; j < SIZE_X; j++){
printf("%d, %d: %d\n", i, j, matrix[i][j]);
}
}
// free the memory
for(i = 0; i < SIZE_X; i++){
free(matrix[i]);
}
free(matrix);
return 0;
}
Answer:
The code for the function is given below in Python language
Explanation:
def append_string_to_file(filename, text):// function takes the filename // and text to append
f = open(filename, 'a')
f.write(text) //function part that writes the text
f.close() //closing the file using the explicit close function
Answer:
In Function library you would find the use in Formula function