diff --git a/mayank gupta 14cs hal9000 b/mayank gupta 14cs hal9000 new file mode 100644 index 0000000..fecbb21 --- /dev/null +++ b/mayank gupta 14cs hal9000 @@ -0,0 +1,57 @@ +/*mayank gupta 14cs hal9000 +os windows 8.1 +compiler devc++*/ + +#include +#include +int main() +{ int a[100],b[100],c,d,temp,temp2,sum=0; +printf("enter the length of vector a"); +scanf("%d",&c); +for(int i=0;i=0;i--){ + for(int j=0;j<=i;j++){ + if(a[j]>a[j+1]){ + temp=a[j]; + a[j]=a[j+1]; + a[j+1]=temp;//bubble sort a + } + } + } + for(int i=d-2;i>=0;i--){ + for(int j=0;j<=i;j++){ + if(b[j]>b[j+1]){ + temp2=b[j]; + b[j]=b[j+1]; + b[j+1]=temp2;//bubble sort b + } + } + } + for( int i=0;i