From 6482032542fb108145ad306b1eb730394a03f80c Mon Sep 17 00:00:00 2001 From: Nayanagowda0 Date: Mon, 19 Feb 2024 12:00:34 +0530 Subject: [PATCH 01/11] first commit --- multiply.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 multiply.c diff --git a/multiply.c b/multiply.c new file mode 100644 index 0000000..e69de29 From 642987b048558f5fe4ff426aadcfb6dd4d2cdcd5 Mon Sep 17 00:00:00 2001 From: nayanagowda0 Date: Mon, 19 Feb 2024 12:12:58 +0530 Subject: [PATCH 02/11] first commit --- add.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/add.c b/add.c index d30993c..336ff40 100644 --- a/add.c +++ b/add.c @@ -1,6 +1,7 @@ #include -int main() { +void main() + { int num1, num2, sum; printf("Enter the first number: "); @@ -12,6 +13,4 @@ int main() { sum = num1 + num2; printf("The sum of %d and %d is %d.", num1, num2, sum); - - return 0; } From 99d3f6f5fc002809894e60b4d109f4574813ff90 Mon Sep 17 00:00:00 2001 From: nayanagowda0 Date: Mon, 19 Feb 2024 12:15:56 +0530 Subject: [PATCH 03/11] first commit --- mul.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mul.c diff --git a/mul.c b/mul.c new file mode 100644 index 0000000..e69de29 From befed7f0ad3b3061776d5cb25124a2e3eed0dbb8 Mon Sep 17 00:00:00 2001 From: nayanagowda0 Date: Mon, 19 Feb 2024 12:18:14 +0530 Subject: [PATCH 04/11] first commit --- multiply.c | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 multiply.c diff --git a/multiply.c b/multiply.c deleted file mode 100644 index e69de29..0000000 From 3d690f286db2bb2d0197a6313cae27d0a9337d15 Mon Sep 17 00:00:00 2001 From: nayanagowda0 Date: Mon, 19 Feb 2024 12:39:10 +0530 Subject: [PATCH 05/11] this is changed --- mul.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mul.c b/mul.c index e69de29..cc4d479 100644 --- a/mul.c +++ b/mul.c @@ -0,0 +1 @@ +this is updayed \ No newline at end of file From 260b305908a8935c22379ce510efb6663e14b049 Mon Sep 17 00:00:00 2001 From: nayanagowda0 Date: Mon, 19 Feb 2024 12:46:11 +0530 Subject: [PATCH 06/11] first commit --- mul.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/mul.c b/mul.c index cc4d479..f646d2f 100644 --- a/mul.c +++ b/mul.c @@ -1 +1,14 @@ -this is updayed \ No newline at end of file +#include +int main() { + double a, b, product; + printf("Enter two numbers: "); + scanf("%lf %lf", &a, &b); + + // Calculating product + product = a * b; + + // %.2lf displays number up to 2 decimal point + printf("Product = %.2lf", product); + + return 0; +} From d913cfea1bdb82b96f85568057b70ae69a4a93c5 Mon Sep 17 00:00:00 2001 From: nayanagowda0 Date: Mon, 19 Feb 2024 12:48:00 +0530 Subject: [PATCH 07/11] first commit --- mul.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mul.c b/mul.c index f646d2f..e961d81 100644 --- a/mul.c +++ b/mul.c @@ -1,5 +1,6 @@ #include -int main() { +void main() +{ double a, b, product; printf("Enter two numbers: "); scanf("%lf %lf", &a, &b); @@ -9,6 +10,4 @@ int main() { // %.2lf displays number up to 2 decimal point printf("Product = %.2lf", product); - - return 0; } From 9f44e34d71501aa3f5edab7d6baa7f930f220e9f Mon Sep 17 00:00:00 2001 From: nayanagowda0 Date: Mon, 26 Feb 2024 12:14:27 +0530 Subject: [PATCH 08/11] first commit --- add.c | 22 ++++++++++------------ multiply.c | 10 ++++++++++ 2 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 multiply.c diff --git a/add.c b/add.c index 336ff40..ccb7c1b 100644 --- a/add.c +++ b/add.c @@ -1,16 +1,14 @@ #include - void main() - { - int num1, num2, sum; - - printf("Enter the first number: "); - scanf("%d", &num1); - - printf("Enter the second number: "); - scanf("%d", &num2); + { + + void number2, number4, sum; - sum = num1 + num2; + printf("Enter two integers: "); + scanf("%d %d", &number1, &number2); + + // calculate the sum + sum = number2 + number4; - printf("The sum of %d and %d is %d.", num1, num2, sum); -} + printf("%d + %d = %d", number2, number4, sum); +} \ No newline at end of file diff --git a/multiply.c b/multiply.c new file mode 100644 index 0000000..33fe563 --- /dev/null +++ b/multiply.c @@ -0,0 +1,10 @@ +#include +int main() { + int n; + printf("Enter an integer: "); + scanf("%d", &n); + for (int i = 1; i <= 10; ++i) { + printf("%d * %d = %d \n", n, i, n * i); + } + return 0; +} From 9058cd07aa6ffd6e8e385904c708ec5e5ca7c97c Mon Sep 17 00:00:00 2001 From: Nayanagowda Date: Mon, 26 Feb 2024 12:43:08 +0530 Subject: [PATCH 09/11] Update add.c --- add.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/add.c b/add.c index ccb7c1b..b833279 100644 --- a/add.c +++ b/add.c @@ -6,9 +6,6 @@ void main() printf("Enter two integers: "); scanf("%d %d", &number1, &number2); - - // calculate the sum sum = number2 + number4; - printf("%d + %d = %d", number2, number4, sum); -} \ No newline at end of file +} From b39ff28b45cdbf32cde8f1de21212668283621c4 Mon Sep 17 00:00:00 2001 From: Nayanagowda0 Date: Mon, 26 Feb 2024 12:45:41 +0530 Subject: [PATCH 10/11] first commit --- add.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/add.c b/add.c index b833279..dc397c5 100644 --- a/add.c +++ b/add.c @@ -1,10 +1,8 @@ #include void main() { - - void number2, number4, sum; - - printf("Enter two integers: "); + int number2, number4, sum; + printf("Enter two integers: "); scanf("%d %d", &number1, &number2); sum = number2 + number4; printf("%d + %d = %d", number2, number4, sum); From f7a951edcff817de46a844bbba363ab3f73e6855 Mon Sep 17 00:00:00 2001 From: Nayanagowda Date: Mon, 11 Mar 2024 11:47:28 +0530 Subject: [PATCH 11/11] Update add.c commit for merge conflict --- add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/add.c b/add.c index dc397c5..b37ee49 100644 --- a/add.c +++ b/add.c @@ -1,9 +1,9 @@ #include void main() { - int number2, number4, sum; + int number1, number2, sum; printf("Enter two integers: "); scanf("%d %d", &number1, &number2); - sum = number2 + number4; + sum = number1 + number2; printf("%d + %d = %d", number2, number4, sum); }