partition of positive and negative numbers in array

+1 vote
asked Jul 15, 2018 by anonymous

2 Answers

0 votes
answered Jul 15, 2018 by anonymous
#include <stdio.h>

int main ()
{
  int i;
  for(i=0;i<50;i++)
  {
      if(i%8==0)
      printf("\n");
      printf("*");
  }
}
0 votes
answered Jul 16, 2018 by anonymous
#include<stdio.h>

void main();

{

i=0;j=n-1;

while(1)

{

 while(a[i]<0 && i<j)

 i++;

{

 while(a[i]>0 && i<j)

 j--;

if (i<j);

swap (a[i],a[j]);

}

}

getch()

]
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...