Skip to content

Commit 3c5aa33

Browse files
authored
Merge pull request #4 from kumarsurajsk/test_case
Update Addition_without_arithmetic.py
2 parents 91d3381 + e8da5dd commit 3c5aa33

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

maths/Addition_without_arithmetic.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Illustrate how to add the integer without arithmetic operation
33
Author: suraj Kumar
44
Time Complexity: 1
5+
https://en.wikipedia.org/wiki/Bitwise_operation
56
"""
67

78

@@ -28,10 +29,11 @@ def add(first: int, sec: int) -> int: # Create a function
2829

2930

3031
if __name__ == "__main__":
32+
first = int(input("Enter the number for first: "))
33+
sec = int(input("Enter the number for sec: "))
3134
import doctest
3235

3336
doctest.testmod()
34-
first = int(input("Enter the number for first: "))
35-
sec = int(input("Enter the number for sec: "))
36-
print("Sum of two numbers", add(first, sec))
37+
38+
# print("Sum of two numbers", add(first, sec))
3739
# Display sum of two numbers

0 commit comments

Comments
 (0)