Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
DUE BY 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 /* #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
arrays vowles printing
B_141205_funciones
Spring 2017 Project 2 v.02
Text to ASCII (top)
PI
Add.c
Why &(a+1) is not allowed
MailingList
Matrices de cadenas con *punteros
project 5 v.075