Advertisement
Spocoman

07. Safe Passwords Generator

Sep 25th, 2024 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.62 KB | None | 0 0
  1. package main
  2.  
  3. import "fmt"
  4.  
  5. func main() {
  6.     var a, b, passCount int
  7.     fmt.Scanln(&a)
  8.     fmt.Scanln(&b)
  9.     fmt.Scanln(&passCount)
  10.    
  11.     var charA = 35
  12.     var charB = 64
  13.  
  14.     for j := 1; j <= a; j++ {
  15.         for x := 1; x <= b; x++ {
  16.             if charA == 56 {
  17.                 charA = 35
  18.             }
  19.             if charB == 97 {
  20.                 charB = 64
  21.             }
  22.             fmt.Printf("%c%c%d%d%c%c|", charA, charB, j, x, charB, charA)
  23.             passCount--
  24.             charA++
  25.             charB++
  26.  
  27.             if passCount == 0 {
  28.                 return
  29.             }
  30.         }
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement