Take side of a square from user and print area and perimeter of it.
puts"Enter side"side=gets.chomp.to_iputs"Area is #{side*side}"puts"Perimeter is #{4*side}"
4.
Take name, roll number and field of interest from user and print in the format below : Hey, my name is xyz and my roll number is xyz. My field of interest is xyz.
puts"Enter name"name=gets.chompputs"Enter roll number"roll=gets.chompputs"Field of interests"interest=gets.chompputs"Hey, my name is #{name} and my roll number is #{roll}. My field of interest is #{interest}"
5.
Write a program to find square of a number. E.g.- INPUT : 2 OUTPUT : 4 INPUT : 5 OUTPUT : 25
puts"Enter number to find the square of it"number=gets.chomp.to_iputsnumber**2
6.
Take two different string input and print them in same line. E.g.- INPUT : Codes Dope OUTPUT : CodesDope
puts"Enter first string"first=gets.chompputs"Enter seconnd string"second=gets.chompfinal=first+secondputsfinal