From 49efbd60961ec56c75fc45618c77f86294c29aef Mon Sep 17 00:00:00 2001 From: mayankmadness Date: Mon, 21 Sep 2015 10:47:06 +0530 Subject: [PATCH] Create mayank gupta 14cs hal9000 --- mayank gupta 14cs hal9000 | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 mayank gupta 14cs hal9000 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