use header files iostream.h and conio.h then void main() { clrscr(); int a[100],i,n,j,temp; cout<<"How many element: "; cin>>n; cout<<"Enter the elements of array: "< for(i=0;i cin>>a[i]; cout<<"The elements of array Before Sorting: "< for(i=0;i cout< for(i=0;i { for(j=0;j { if(a[j]>a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } cout<<"Elements of array After Sorting: "< for(i=0;i cout< getch();} Output:- How many element: 3 Enter the elements...
use header files iostream.h,process.h and conio.h then void main() { int array[100],n,i,j,temp; clrscr(); cout<<"How many numbers--> "; cin>>n; cout<<"Enter "< for(i=0;i cin>>array[i]; //created by sourabh for(i=0;i { for(j=i+1;j if(array[i]>array[j]) { temp=array[i]; array[i]=array[j]; array[j]=temp; } } cout<<"\nArray is sorted in ascending order.\n"; for(i=0;i cout< ...
use header files iostream.h,process.h and conio.h then void main() { int ar[100],beg,mid,end,i,n,search; clrscr(); cout<<"How many numbers in the array: "; cin>>n; cout<<"Enter "< "; for(i=0;i cin>>ar[i]; beg=0; end=n-1; cout<<"Enter a number to search: "; cin>>search; while(beg<=end) { mid=(beg+end)/2; if(ar[mid]==search) { cout<<"\nItem found at position "<<(mid+1); getch();...
use header files iostream.h and conio.h then class array { public: int arr[10]; void input() { cout<<"\n\nenter the array Element"; for(int i=0;i<=5;i++) { cin>>arr[i]; } } void search (int no) { int flag=0; for (int i=0;i<=5;i++) { if (no==arr[i]) { flag=1; break; }...
Entrance Examinations 2013-14 Exam Name Expected Date/ Actual Date Application Form Details JEE Main Offline Exam: 7th April, 2013 Online Exam: 8th to 30th April, 2013 There will be no physical sale of Application Forms. Applications to be filled online only. Online Registration will start from: 8th November, 2012. JEE Advanced Offline Exam Only: 2nd June, 2013 Forms will be filled after JEE...