Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
DUE TUESDAY
2 for loops i and j control the loops and do not go ++i or ++j, know when you are going to move C Program that takes two arrays 1,4,6,9,15 2,5,8,10 Merge these two arrays in new array Merged array is in ascending order Size n and size m and new array has size n+m point to the first index of both, compare which is bigger and which is smaller fill array with smallest then biggest in those two spots Initialize the arrays array1 and array2 and set the values find size of array1 and array 2 and set value to n and m initialize array3 o=n+m set size of array3 to o have an i statement but no incrementing in the for loop statement itself, plan to have ++i and ++j only when the /* #include <stdio.h> int main(void) { int found = 0, index; int mat[]={10,12,20,25,13,10,9,40,60,5}; for (int i = 0; i<10;i++) { if(mat[i]==5) { found = 1; index = i; } } if(found == 1) printf("The index is %d",index); else printf("Element not found"); return 0; }*/ /* #include <stdio.h> int main(void) { int n = 3; int array[3][3] ={{4,5,3},{0,1,2},{11,12,10}}; for(int x=0;x<n;x++){ printf("{ "); for(int y=0;y<n;y++){ if (array[x][y]%2==0){ array[x][y]=0; } else if (array[x][y]%2!=0){ array[x][y]=1; } printf("%d ", array[x][y]); } printf("}\n"); } } */ /* #include <stdio.h> #define m 3 #define n 3 #define o 3 int main(){ int i, j, k; int arr[3][3][3]= { { {11, 12, 13}, {14, 15, 16}, {17, 18, 19} }, { {21, 22, 23}, {24, 25, 26}, {27, 28, 29} }, { {31, 32, 33}, {34, 35, 36}, {37, 38, 39} }, }; for (int i=0; i<m; i++){ for (int j=0; j<n; j++);{ for (int k=0; k<o; k++);{ printf("Value for array[%d][%d][%d] = %d\n", i, j, k, arr[i][j][k]); } } } return 0; } */
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Pregunta 3 de registros
my first matrix addition
My first array
quicksort guía 4
Leap year check
pth_monte_carlo_pi.c
150114_MatrizSumaPerimetro
no output
Lab 9 v0.6
faster posting list using skip pointers
Please log in to post a comment.