Read numbers form user and place them in array, C/C++ Programming

Assignment Help:

Read numbers form user and place them in array:

Program is to read a group numbers of numbers form user and place them in array type of float and sort them

void sort(float a[]);

 int i,n;

 void main()

   {

    clrscr();

    float a[20];

    cout <<" enter  no of terms: ";

    cin>>n;

    cout<<" enter the elements ";

    for(i=0; i

     {

    cin>>a[i];

     }

    sort(a[i]);

   }

 

void sort(float a[])

  {

  int t,j,po;

  float min;

   for(i=0; i

    {

    min=a[i];

    po=i;

    for (j=i+1; j

     {

     if (a[j]

       {

      min=a[j];

      po=j;

       }

     }

  t=a[po];

  a[po]=a[i];

  a[i]=t;

  }

 for(i=0;i

 cout<<" sorted elements ";

 cout<

 }


Related Discussions:- Read numbers form user and place them in array

Linux driver and linux, Project Description: I´ve a need linux programmi...

Project Description: I´ve a need linux programming job. if you are interested, Skills required are C Programming, PCB Layout, Embedded Software, Python, Software Architecture

C code, how can i easily make a program?

how can i easily make a program?

C++ project, project on business management

project on business management

C program to print fibonacci series upto n using recursion, C program to Pr...

C program to Print Fibonacci series upto n using recursion: int fibo(long int); void main() {                 long int a=0,n;                 printf ("how many term

Arrays, #question.Write a c++ program to accept and print a 1_d array

#question.Write a c++ program to accept and print a 1_d array

Flowcharting., flowcharting of 3 quizes display the average

flowcharting of 3 quizes display the average

Using only arrays, write c program to do the following : -fill 2 dimensiona...

write c program to do the following : -fill 2 dimensional array (square matrix array with size=4). -ask the user to enter any integer number and add this number to the diagonals -o

Cipher: Decrypt and Encrypt, You must write a program that can both decrypt...

You must write a program that can both decrypt and encrypt a single word that is entered by the user. The initial choice of encryption and decryption is left up to the user. Addi

#title areaundercurve.c, Write a program to find the area under the curve y...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Difference between method overloading and method overriding, Overloading a ...

Overloading a method (or function) in C++ is the ability for functions of the similar name to be defined as long as these methods have dissimilar signatures (different set of param

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd