vadim_sharaf

Untitled

Mar 15th, 2023
1,358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.75 KB | None | 0 0
  1. let student = ("Romantsev", "Igor", "Vitalevich")
  2. switch student {
  3.     case (_, let name, _) where ((name[name.startIndex] == "A") || (name[name.startIndex] == "O")): print("Hello \(name)")
  4.     case (_, _, let fathName) where ((fathName[fathName.startIndex] == "V") || (fathName[fathName.startIndex] == "D")): print("Hello \(student.1) \(fathName)")
  5.     case (let surname, _, _) where ((surname[surname.startIndex] == "E") || (surname[surname.startIndex] == "Z")): print("Hello \(surname)")
  6.     default: print("Hello \(student.0) \(student.1) \(student.2)")
  7. }
  8.  
  9.  
  10. //4 задание
  11. for i in 0..<1 {
  12.     for j in 0..<1 {
  13.         let point : (x: String?, y: String?) = (readLine(), readLine())
  14.         switch point {
  15.             case (""
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment