Question 1-
Step 1- Declare an integer array of 50 terms.
Step 2- Initialise 1st and 2nd term of the array as 0 and 1.
Array [0] = 0
Array [1] = 1
Step 3- For “the next term till the iterator reaches the number 50” { array [i+2]=array[i+1]+array[i]
Cout array [i+2]}
Question 2-
Step 1- take an input as an integer
Step2- If (input belongs to 1 to 10)
{output “blue”}
Else if (input belongs to 10 to 20)
{output “red”}
Else if (input belongs to 20 to 30)
{output “green}
Else {output “not a correct color option”}
Question 3-
Step 1- take input till where the even numbers are to be written
For (till the input value is reached increase value of intretor by 2)
{print the value of interator starting at , interator = interator+2 }
Question 4-
Step 1- Take input as three numbers from the user
If (num1<num2 & num2<num3)
{print num1, num2, num3}
Else if (num1<num3& num2>num3)
{print num1, num3, num2}
Else If (num2<num1& num3>num1)
{print num2, num1, num3}
Else If(num3>num2& num1>num3)
{print num2, num3, num1}
Else if (num 3<num2& num2<num1)
{print num3, num2, num1}
Else {print num3, num1, num2}
Question 4-
Step 1- take a input form user and declare as variable “sum” with value 0
Step2- if (input>0)
Step3- {sum = sum + input
Go to line 1}
Step4- else(stop)
Step5 – print sum