From f81a410518b5d0af188448cbcc34c8a75cc58b32 Mon Sep 17 00:00:00 2001 From: Betty k Date: Sun, 26 May 2024 20:29:49 +0530 Subject: [PATCH 1/4] first commit --- betty.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 betty.c diff --git a/betty.c b/betty.c new file mode 100644 index 0000000..c88a6e0 --- /dev/null +++ b/betty.c @@ -0,0 +1,21 @@ +#include + +int main() +{ + int A, B, sum = 0; + + // Ask user to enter the two numbers + printf("Enter two numbers A and B : \n"); + + // Read two numbers from the user || A = 2, B = 3 + scanf("%d%d", &A, &B); + + // Calculate the addition of A and B + // using '+' operator + sum = A + B; + + // Print the sum + printf("Sum of A and B is: %d", sum); + + return 0; +} \ No newline at end of file From 04ffaff982ff087a8fb5cb304dea3d851c8ee0cd Mon Sep 17 00:00:00 2001 From: Betty k <156065962+bettykgeorge@users.noreply.github.com> Date: Sun, 26 May 2024 20:42:55 +0530 Subject: [PATCH 2/4] Update betty.c --- betty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/betty.c b/betty.c index c88a6e0..fd22235 100644 --- a/betty.c +++ b/betty.c @@ -15,7 +15,7 @@ int main() sum = A + B; // Print the sum - printf("Sum of A and B is: %d", sum); + printf("adddition of A and B is: %d", sum); return 0; -} \ No newline at end of file +} From ea2d05159be5183f5b2e07672e8586ddb5500a86 Mon Sep 17 00:00:00 2001 From: bettykgeorge Date: Sun, 26 May 2024 20:46:38 +0530 Subject: [PATCH 3/4] first commit --- betty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/betty.c b/betty.c index fd22235..0d9400a 100644 --- a/betty.c +++ b/betty.c @@ -15,7 +15,7 @@ int main() sum = A + B; // Print the sum - printf("adddition of A and B is: %d", sum); + printf("add of A and B is: %d", sum); return 0; } From a55cee80b245012d16f43e4f40e866c9e268d086 Mon Sep 17 00:00:00 2001 From: Betty k <156065962+bettykgeorge@users.noreply.github.com> Date: Sun, 26 May 2024 20:48:02 +0530 Subject: [PATCH 4/4] Update betty.c --- betty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/betty.c b/betty.c index 0d9400a..af00a50 100644 --- a/betty.c +++ b/betty.c @@ -5,14 +5,14 @@ int main() int A, B, sum = 0; // Ask user to enter the two numbers - printf("Enter two numbers A and B : \n"); + printf("Enter three numbers A and B : \n"); // Read two numbers from the user || A = 2, B = 3 - scanf("%d%d", &A, &B); + scanf("%d%d", &A, &B, &c); // Calculate the addition of A and B // using '+' operator - sum = A + B; + sum = A + B + c; // Print the sum printf("add of A and B is: %d", sum);