From 4166dea25b5117496202beb9ea159a96f3f4a941 Mon Sep 17 00:00:00 2001 From: sanjay-xdr <55450200+sanjay-xdr@users.noreply.github.com> Date: Thu, 1 Oct 2020 10:18:31 +0530 Subject: [PATCH 1/3] Add files via upload --- C/program-47/program 47.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 C/program-47/program 47.c diff --git a/C/program-47/program 47.c b/C/program-47/program 47.c new file mode 100644 index 00000000..0a87a07c --- /dev/null +++ b/C/program-47/program 47.c @@ -0,0 +1,33 @@ +#include +#include +#include + +int main() +{ + /* Length of the password */ + int length; + int num; + int temp; + printf("Enter the length of the password: "); + scanf("%d", &length); + printf("\nEnter the number of passwords you want: "); + scanf("%d", &num); + /* Seed number for rand() */ + srand((unsigned int) time(0) + getpid()); + + while(num--) + { + temp = length; + printf("\n"); + while(temp--) { + putchar(rand() % 56 + 65); + srand(rand()); + } + + temp = length; + } + + printf("\n"); + + return EXIT_SUCCESS; +} From e5eac41d67a831c208c374ea24801e2cdc664ce2 Mon Sep 17 00:00:00 2001 From: sanjay-xdr <55450200+sanjay-xdr@users.noreply.github.com> Date: Thu, 1 Oct 2020 10:19:58 +0530 Subject: [PATCH 2/3] Update README.md --- C/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/C/README.md b/C/README.md index 9251eeaa..22050aa9 100644 --- a/C/README.md +++ b/C/README.md @@ -48,6 +48,7 @@ | Program-44 | Program for implementation of the approach | | Program-45 | Program to illustrate the above given pattern of numbers. | | Program-46 | Program to convert binary number to decimal | +| Program-47 | Program to generate strong password | From 6ebad9f1c2a9cc6ab65346e5bd5d6c3bb3855846 Mon Sep 17 00:00:00 2001 From: sanjay-xdr <55450200+sanjay-xdr@users.noreply.github.com> Date: Thu, 1 Oct 2020 11:28:32 +0530 Subject: [PATCH 3/3] Add files via upload --- Python/program-4/Program 4.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Python/program-4/Program 4.py diff --git a/Python/program-4/Program 4.py b/Python/program-4/Program 4.py new file mode 100644 index 00000000..77c405f9 --- /dev/null +++ b/Python/program-4/Program 4.py @@ -0,0 +1,9 @@ +# Store input numbers +num1 = input('Enter first number: ') +num2 = input('Enter second number: ') + +# Add two numbers +sum = float(num1) + float(num2) + +# Display the sum +print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))