Consider a programming language with the following statements: x:= 3: y:= 2: z:= x + y: write (z) Execution of these statements prints the value 5 on the console. Is this a declarative, imperative, or functional language? For each of these paradigms, very briefly explain why you think this example is or isn’t a language from the given paradigm.
It is a imperative language also, as we have specified the data step by step. First we declare the variables x and y and then add them into a variable z. This is a step by step approach, which tells computer how to do it.
It is not a functional language, because in functional languages, we use the functions and mathematical logic heavily. In that we try to convert the set of input to output by the use of different functions.