From 2bcef75a8313b6d308b6971ed68032702a6adc3c Mon Sep 17 00:00:00 2001 From: har6451 <68863245+har6451@users.noreply.github.com> Date: Fri, 2 Oct 2020 08:48:19 +0545 Subject: [PATCH 1/3] Update Add two no. without using third variable.CPP --- Add two no. without using third variable.CPP | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Add two no. without using third variable.CPP b/Add two no. without using third variable.CPP index b673baf..6ee4792 100644 --- a/Add two no. without using third variable.CPP +++ b/Add two no. without using third variable.CPP @@ -3,12 +3,12 @@ #include void main() { clrscr(); - int a,b; + int a,b,c; printf("Enter a:"); scanf("%d",&a); printf("Enter b:"); scanf("%d",&b); - a=a+b; - printf("Sum=%d",a); + c=a+b; + printf("Sum=%d",c); getch(); -} \ No newline at end of file +} From ec37e8cc998f0aca937f9241250d43b812b3b6e9 Mon Sep 17 00:00:00 2001 From: har6451 <68863245+har6451@users.noreply.github.com> Date: Fri, 2 Oct 2020 08:51:38 +0545 Subject: [PATCH 2/3] Update Area of rectangle.CPP --- Area of rectangle.CPP | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Area of rectangle.CPP b/Area of rectangle.CPP index 6008494..8cba2da 100644 --- a/Area of rectangle.CPP +++ b/Area of rectangle.CPP @@ -4,11 +4,11 @@ void main() { clrscr(); float l,b,a; - printf("Enter breath : "); + printf("Enter the breath of the rectangle : "); scanf("%f",&b); - printf("Enter length : "); + printf("Enter the length of the rectangle : "); scanf("%f",&l); a=b*l; - printf("Area of rectangle=%.2f",a); + printf(" The Area of the rectangle is =%.2f",a); getch(); -} \ No newline at end of file +} From 8a13ffe5d082687e39ee5dceb83f626642b5c268 Mon Sep 17 00:00:00 2001 From: har6451 <68863245+har6451@users.noreply.github.com> Date: Fri, 2 Oct 2020 09:24:07 +0545 Subject: [PATCH 3/3] Update Arrange in accending order.CPP --- Arrange in accending order.CPP | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Arrange in accending order.CPP b/Arrange in accending order.CPP index 8aba462..2b51a5e 100644 --- a/Arrange in accending order.CPP +++ b/Arrange in accending order.CPP @@ -4,13 +4,18 @@ void main() { clrscr(); int a[10],i,j,k; - printf("Enter elements\n"); + printf("Enter the elements in the array\n"); for(i=0;i<10;i++) + { scanf("%d",&a[i]); + } for(k=0;k<10;k++) - { for(i=0;i<9;i++) - { if(a[i]>a[i+1]) - { j=a[i]; + { + for(i=0;i<9;i++) + { + if(a[i]>a[i+1]) + { + j=a[i]; a[i]=a[i+1]; a[i+1]=j; } @@ -20,4 +25,4 @@ void main() for(i=0;i<10;i++) printf("%d\n",a[i]); getch(); -} \ No newline at end of file +}