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!
Bubble sort C program:
Write a program to define a bubble sort.
void main()
{
clrscr();
int a[100],ch,n;
cout<<"enter the limit for the array : ";
cin>>n;
for (int i=0;i { cout<<"enter element "< cin>>a[i]; } clrscr(); cout<<"1. bubble sorting"< bsort(a,n); } } void bsort(int a[100],int n) { clrscr(); int i,j,ch2,t; cout<<"1. ascending order "< cout<<"2. descending order "< cout<<" your choice : "; cin>>ch2; switch(ch2) { case 1 : for (i=0;i { for (j=0;j { if (a[j] > a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; case 2 : for (i=0;i { for (j=0;j { if (a[j] < a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; default : cout<<" wrong choice "; } cout<<" sorted arrays by bubble "<<"\n\n"; for (i=0;i { cout< } getch(); }
cout<<"enter element "<
cin>>a[i];
}
cout<<"1. bubble sorting"< bsort(a,n); } } void bsort(int a[100],int n) { clrscr(); int i,j,ch2,t; cout<<"1. ascending order "< cout<<"2. descending order "< cout<<" your choice : "; cin>>ch2; switch(ch2) { case 1 : for (i=0;i { for (j=0;j { if (a[j] > a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; case 2 : for (i=0;i { for (j=0;j { if (a[j] < a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; default : cout<<" wrong choice "; } cout<<" sorted arrays by bubble "<<"\n\n"; for (i=0;i { cout< } getch(); }
bsort(a,n);
void bsort(int a[100],int n)
int i,j,ch2,t;
cout<<"1. ascending order "< cout<<"2. descending order "< cout<<" your choice : "; cin>>ch2; switch(ch2) { case 1 : for (i=0;i { for (j=0;j { if (a[j] > a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; case 2 : for (i=0;i { for (j=0;j { if (a[j] < a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; default : cout<<" wrong choice "; } cout<<" sorted arrays by bubble "<<"\n\n"; for (i=0;i { cout< } getch(); }
cout<<"2. descending order "< cout<<" your choice : "; cin>>ch2; switch(ch2) { case 1 : for (i=0;i { for (j=0;j { if (a[j] > a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; case 2 : for (i=0;i { for (j=0;j { if (a[j] < a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; default : cout<<" wrong choice "; } cout<<" sorted arrays by bubble "<<"\n\n"; for (i=0;i { cout< } getch(); }
cout<<" your choice : ";
cin>>ch2;
switch(ch2)
case 1 : for (i=0;i { for (j=0;j { if (a[j] > a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; case 2 : for (i=0;i { for (j=0;j { if (a[j] < a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; default : cout<<" wrong choice "; } cout<<" sorted arrays by bubble "<<"\n\n"; for (i=0;i { cout< } getch(); }
for (j=0;j { if (a[j] > a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; case 2 : for (i=0;i { for (j=0;j { if (a[j] < a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; default : cout<<" wrong choice "; } cout<<" sorted arrays by bubble "<<"\n\n"; for (i=0;i { cout< } getch(); }
if (a[j] > a[j+1])
t=a[j+1];
a[j+1]=a[j];
a[j]=t;
break;
case 2 : for (i=0;i { for (j=0;j { if (a[j] < a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; default : cout<<" wrong choice "; } cout<<" sorted arrays by bubble "<<"\n\n"; for (i=0;i { cout< } getch(); }
for (j=0;j { if (a[j] < a[j+1]) { t=a[j+1]; a[j+1]=a[j]; a[j]=t; } } } break; default : cout<<" wrong choice "; } cout<<" sorted arrays by bubble "<<"\n\n"; for (i=0;i { cout< } getch(); }
if (a[j] < a[j+1])
default : cout<<" wrong choice ";
cout<<" sorted arrays by bubble "<<"\n\n";
for (i=0;i { cout< } getch(); }
cout< } getch(); }
getch();
Precedence and Order of evaluation The languages follow a standard precedence for basic operators. Precedence rules help in deleting ambiguity of the order of operations perfor
What does ODBC do in context with PHP? PHP supports many databases such as dBase, Microsoft SQL Server, Oracle, etc. however, it also supports databases such as filePro, FrontB
what is virtual datatype
What happens while a derived-class object is developed & destroyed? A: Space is allocated (on the heap or the stack) for the full object (i.e. adequate space to store the data m
Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4
solution
There are 3 acceptable answers: "Never," "Rarely "and" When the problem domain cannot be accurately modelled any other way."
write a c program chat illustrates the creation of child process using fork system call. One process finds sum of even series and other process finds sum of odd series.
Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules. a. A call made between 8:00 AM and 6:
13446
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd