WE-AFFILIATE

We are selling Writer

  • dictionaries

     /**


    Welcome to GDB Online.

    GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,

    C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.

    Code, Compile, Run and Debug online from anywhere in world.


    */


    print("how are you boss!!!")

    print("feeling tired...? ")


    print("please drink a little bit of water....pls sir...")




    var mydictionary = [String:String]()

    ///  [String:String]() ____it's empty variable define the type of data as much you can :)///


    mydictionary["SJD 312 "] = "BLACK BMW" 


    mydictionary["MMW 332 "] = "RED FARRARY" 





    let car = mydictionary["SJD 312"]

    for (key, value) in mydictionary {

        

        print("Car Number:\( key )and it's colour is \( value ) please catch him!")  

        

        

    }


  • array

     


    print("how are you boss!!!")

    print("feeling tired...? ")


    print("please drink a little bit of water....pls sir...")





    var myarray = ["dog","cat","bird","frog"]





    for counter in 0...3{

        

        print("my " + myarray[counter])

        

    }




  • example: intializer

     class person{

        var name:String

        var gender:String?

        var networth:Int!

        

        init (){

            

            name = "mr_Faiz"

        }

        

    }



    var a = person()

    print(a.name)


  • example :creating class

     class thepresent{

        

        func xpresent() -> Int {

        return Int.random(in:1...10)

            

        }

        

        

    }



    var a = thepresent()


    print(a.xpresent())


  • defining var (nil)

     



    var a:String =  "hey"



    ///this is wrapped

    var b:String? = nil


    var c:String

    ///this is unwrapped

    var d:String!


  • class (class correlation & super class)

     /**


    Welcome to GDB Online.

    GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,

    C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.

    Code, Compile, Run and Debug online from anywhere in world.


    */

    print("good morning boss!!!")


    print("hey good morning!!!....lets start...")



    class employee {

        

        var name = ""

        var salary = 0

        var role = ""

        

        func dowork(){

            

            print("i'm doing work here...!")

            

        }

        

        

    }



    class manager: employee {

        

        func managing(){

            

            print("i'm managing people & also firing them")

            

        }

        

    }


    var a = manager()

    a.name = "UTSAV THAKKAR"

    a.salary = 20000

    a.role = "manage_P"



    print(a.name)

    print(a.salary)

    print(a.role)

    a.dowork()

    a.managing()



  • class

     /**


    Welcome to GDB Online.

    GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,

    C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.

    Code, Compile, Run and Debug online from anywhere in world.


    */


    print("hello boss!!! how are you...!")


    class employee {

        

        var name = ""

        var salary = 0

        var role = ""


    func abtjob(){

        

        print("i am chris and i am loving my job as senior ios dev")

    }

        

    }


    var c = employee ()

     c.name = "FAIZAN KHAN"

     c.salary = 15000

     c.role = "FOUNDER"

     c.abtjob()

     

    print(c.name)

    print(c.salary)

    print(c.role)




    var d = employee()

    d.name = "chris"

    d.salary = 10000

    d.role = "senior software engineer"

    d.abtjob()


    print(d.name)

    print(d.role)

    print(d.salary)



     c.abtjob()


  • GET MORE PRODUCTS

    We are providing best products.