From 93000bf3ec61d3b87cb6e1766adf2ba84df072c1 Mon Sep 17 00:00:00 2001 From: Dhruv Rawat <51899618+dhruvrawat10@users.noreply.github.com> Date: Thu, 10 Oct 2019 14:38:07 +0530 Subject: [PATCH] Update and rename e9.c to e9.py CODE to calculate factors of a number --- e9.c | 0 e9.py | 6 ++++++ 2 files changed, 6 insertions(+) delete mode 100644 e9.c create mode 100644 e9.py diff --git a/e9.c b/e9.c deleted file mode 100644 index e69de29..0000000 diff --git a/e9.py b/e9.py new file mode 100644 index 0000000..64990df --- /dev/null +++ b/e9.py @@ -0,0 +1,6 @@ +#PYTHON CODE +a=int(input("ENTER A NUMBER")) +print("The factors of",a,"are:") + for i in range(1, x + 1): + if x % i == 0: + print(i)