Phantom Rhythm
Honorary Poster
- Joined
- Sep 10, 2018
- Posts
- 680
- Reaction
- 69
- Points
- 206
Pa help po paano gumawa ng test drive nito, gamit ang odd numbers and even numbers sa element ng array.
#include<stdio.h>
#define SIZE 5
int main(){
int array[SIZE]={1,2,3,4,5},i,j,temp;
for(i=0,j=SIZE-1;i<j;i++,j—){
temp=array;
array=array[j];
array[j]=temp;
}
printf(“Reverse array is:\n”);
for(i=0;i<SIZE;i++){
printf(“%d\n”,array);
}
}
#include<stdio.h>
#define SIZE 5
int main(){
int array[SIZE]={1,2,3,4,5},i,j,temp;
for(i=0,j=SIZE-1;i<j;i++,j—){
temp=array;
array=array[j];
array[j]=temp;
}
printf(“Reverse array is:\n”);
for(i=0;i<SIZE;i++){
printf(“%d\n”,array);
}
}