Programming

Can anybody help to WAP to arrange the elements of array where all positive integers appear before negative integers.

  1. 👍 0
  2. 👎 0
  3. 👁 30
asked by Raj
  1. In VBA pls

    1. 👍 0
    2. 👎 0
    posted by Raj
  2. one easy way is to create two new arrays, then scan the original array, placing positive values into one, and negative values into the other.
    Then join the two arrays into one new array.

    google can help you find VBA code snippets to perform these tasks.

Respond to this Question

First Name

Your Response

Similar Questions

  1. computer science C++

    The variables arr1 and arr2 have been declared as pointers to integers. An array of 10 elements has been allocated, its pointer assigned to arr1, and the elements initialized to some values. Allocate an array of 20 elements,

    asked by Erika on February 15, 2012
  2. C++

    The variables arr1 and arr2 have been declared as pointers to integers . An array of 10 elements has been allocated, its pointer assigned to arr1, and the elements initialized to some values . Allocate an array of 20 elements ,

    asked by Frank on March 16, 2014
  3. programming

    A. Write a program which reads an array of up to 200 integers from input and then does all the following in order 1. searches the array for a specific integer given by the user and outputs its position in the array; 2. outputs the

    asked by pauline on April 3, 2015
  4. MATH combinatorics HELP!!!!!

    Determine the least positive integer n for which the following condition holds: No matter how the elements of the set of the first n positive integers, i.e. {1,2,…n}, are colored in red or blue, there are (not necessarily

    asked by Bob K. on May 11, 2013
  5. Maths

    in the following rings find all units, Zero divisors and idompotent elements and determine whether the ring is a field. a)Z2 b)Z5 c)Z10 NB z is integers( positive or negatives including zero z is integers( positive or negatives

    asked by JESS on November 20, 2012
  6. Computer Science

    I need help with this question please! Please write me step by step instructions or how should I begin the problem. Thank you for your time ;) Write a function that takes an array and returns true if all the elements in the array

    asked by nutz on January 21, 2013
  7. geometry!!! please help me!!!!

    Determine the least positive integer n for which the following condition holds: No matter how the elements of the set of the first n positive integers, i.e. {1,2,…n}, are colored in red or blue, there are (not necessarily

    asked by sanji on May 8, 2013
  8. Math(combinations) Help

    Let Pn be the set of all subsets of the set [n]={1,2,…,n}. If two elements of P5 are chosen at random, the expected number of elements (of [n]) that they have in common can be expressed as a/b where a and b are coprime positive

    asked by Mathslover on May 13, 2013
  9. math

    Let Pn be the set of all subsets of the set [n]={1,2,…,n}. If two distinct elements of P5 are chosen at random, the expected number of elements (of [n]) that they have in common can be expressed as a/b where a and b are coprime

    asked by Pandey ji on May 16, 2013
  10. Data Structures and Algorithms

    Given integers R,M with M≠0, let S(R,M) denote the smallest positive integer x satisfying the congruence Rx≡1(mod M) if such an x exists. If such an x does not exist, put S(R,M)=0. Each line of this text file contains a pair

    asked by Steven on July 24, 2013

More Similar Questions