Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
C Program for SORTING OF NUMBERS
main()
{
int a[20],i,j,temp,n;
clrscr();
printf("ENTER THE MAXIMUM LIMIT: ");
scanf("%d",&n);
for(i=1;i<=n;i++)
printf("ENTER %d ELEMENT: ",i);
scanf("%d",&a[i]);
}
for(i=1;i<=n-1;i++)
for(j=i+1;j<=n;j++)
if(a[i]>a[j])
temp=a[i];
a[i]=a[j];
a[j]=temp;
printf("\nTHE SORTED ELEMENTS ARE. \n");
for(j=1;j<=n;j++)
printf(" %d",a[j]);
getch();
OUTPUT :
ENTER THE MAX. LIMIT: 5
ENTER 1 NO: 5
ENTER 2 NO: 8
ENTER 3 NO: 10
ENTER 4 NO: 1
ENTER 5 NO: 2
THE SORTED ELEMENTS ARE:
1 2 5 8 10
#questio#A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concate
The program will ask the user to enter: '1' to List the cities(and their state abbrev) from largest to smallest (by their population) with their population '2' to List the
A string S is said to be "Super ASCII", if it contains the character frequency equal to their ascii values. String will contain only lower case alphabets (''a''-''z'') and the asci
Description: Create a program that allows the user to track the hours an employee worked in a week. How much the employee was paid and any extra hours worked (overtime pay).
Ask question #Mi fd d fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Aim: To implement a program to add two polar coordinates using operator overloading. Code: #define PI 3.14 class polar { double
Structures A structure is a derived data type. It is a combination of logically related data items. Unlike arrays, which are a collection of such as data types, structures can
Describe Processing an array? The Single operations which involve complete arrays are not permitted in C language. therefore if a and b are similar arrays (for example same dim
Question 1 Explain the concept of constructors and destructors in C++ with programming examples Question 2 Explain the concepts and applications of multiple inheritance and v
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!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd