Skip to main content

Unique password generator program



Generate Unique password program


 #include<stdio.h>
#include<stdlib.h>
#include<time.h>
int main()
{
 int i,password,len;
 srand((unsigned int)time(NULL));
 printf("\n\n\n\t\t\t ENTER THE PASSWORD LENGHT AND MUST  BE GREATER THAN 5 : ");
 scanf("%d",&len);
 if(len>=5&&len<=20)
 {
  for(i=0;i<len;i++)
  {
   int k=rand()%128;
   if((k>=48&&k<=57)||(k>=65&&k<=90)||(k>=97&&k<=122)||(k>=35&&k<=37)||k==64)
   {
    printf("%c",k);
   }
   else
   {
    i--;
   }
  }
  printf("\n");
 }
 else
 {
  printf("\n\t\t\t LENGTH SHOULD BE GREATER THAN 5 and equal or less than 20 !!! ");
  
 }
 return 0;
}



Video link : https://youtu.be/weQYMCiEIds

Comments

Popular posts from this blog

Python Turtle : Create a attractive Petal Design

 Python Turtle Attractive Petal design in Python  import turtle # create the turtle object trt = turtle.Turtle() # create the screen object scr = turtle.Screen() #increase the pensize trt.pensize( 3 ) # set the background color to black scr.bgcolor( 'black' ) # set the pencolor to white colors = [ 'red' , 'orange' , 'yellow' , 'skyblue' , 'blue' , 'indigo' , 'violet' ] # increase the speed trt.speed( 0 ) # now first create a single petal # lets define the distance dis = 50 trt.color( "yellow" ) for color in range ( 20 ): for j in range ( 1 , 8 ): trt.left( 50 ) for i in range ( 2 ): trt.forward(dis) trt.left( 60 ) #rotate at 60 degree in clockwise trt.forward(dis) trt.left( 120 ) #rotate at 120 degree in clockwise dis = dis + 5 #hide the turtle after the shape has been drawn trt.hideturtle() turtle.done() Output : Learn thr...

Python Turtle tutorials : Create a Bi-Pyramid structure

 Python Turtle Tutorials  Create a Bi-Pyramid structure using Python  Code :           """ Program to create a Bi-pyramid structure Source : CODE PROBLEM (Youtube) """ import turtle scr = turtle.Screen() # create screen object scr.bgcolor( 'black' ) turtle.speed( 0 ) # the fastest speed turtle.pensize( 2 ) # set the width of the drawing pen turtle.color( 'skyblue' ) # set pencolor to 'skyblue' for i in range ( 30 ): turtle.fd(i* 10 ) turtle.right( 120 ) for j in range ( 29 , 0 ,- 1 ): turtle.fd(j* 10 ) # move forward turtle.left( 120 ) turtle.hideturtle() # hiding the turtle after the completion of the drawing turtle.done() # for holding the screen Output : Learn from video : Watch on youtube

Python Turtle Programs : Attractive Shell Design using Python

 Python Turtle Create a Shell like design using Python turtle. Code : """ Program to create a shell structure Source : CODE PROBLEM (Youtube) """ import turtle trt= turtle.Turtle() # create turtle object scr = turtle.Screen() # create screen object scr.bgcolor( 'black' ) colors = [ 'red' , 'orange' , 'yellow' , 'green' , 'blue' , 'indigo' , 'violet' , 'skyblue' ] trt.pensize( 3 ) # set the width of the drawing pen trt.speed( 0 ) # the fastest speed dis = 292 # initial value for c in colors: # using different colors at each iteration trt.color(c) for j in range ( 9 ): trt.left( 10 ) for i in range ( 3 ): trt.forward(dis) trt.left( 119 ) dis -= 4 trt.hideturtle() # hiding the turtle after the completion of the drawing turtle.done() # for holding the screen Output : Watch Video : Python Shell Design