From 9b0c1fc2f893b3b5a5ca41792cf5a1b3e034c7bd Mon Sep 17 00:00:00 2001 From: 22bcad44Pinky Date: Mon, 27 May 2024 23:50:16 +0530 Subject: [PATCH 1/2] first commit --- add.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 add.c diff --git a/add.c b/add.c new file mode 100644 index 0000000..a5170b6 --- /dev/null +++ b/add.c @@ -0,0 +1,26 @@ +#include + +int main() +{ + // Declare variables + int num1,num2,sum; + + + + printf("Enter two integers: "); + + scanf("%d %d", &num1, &num2); + + + + // calculate the sum of two numbers + + sum = num1 + num2; + + + + // Print the result + + printf("%d + %d = %d", num1, num2, sum); + return 0; +} \ No newline at end of file From 104873a11425192188a0ba564ab0116753fd0b12 Mon Sep 17 00:00:00 2001 From: PinkySharmaA28 <148611409+PinkySharmaA28@users.noreply.github.com> Date: Mon, 27 May 2024 11:45:40 +0530 Subject: [PATCH 2/2] Update add.c --- add.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/add.c b/add.c index a5170b6..c614895 100644 --- a/add.c +++ b/add.c @@ -1,7 +1,7 @@ #include int main() -{ + // Declare variables int num1,num2,sum; @@ -23,4 +23,4 @@ int main() printf("%d + %d = %d", num1, num2, sum); return 0; -} \ No newline at end of file +}