Answer:
Codes for each of the problems are explained below
Explanation:
PROBLEM 1 IN C++:
#include<iostream>
using namespace std;
//fib function that calculate nth integer of the fibonacci sequence.
void fib(int n){
// l and r inital fibonacci values for n=1 and n=2;
int l=1,r=1,c;
//if n==1 or n==2 then print 1.
if(n==1 || n==2){
cout << 1;
return;
}
//for loop runs n-2 times and calculates nth integer of fibonacci sequence.
for(int i=0;i<n-2;i++){
c=l+r;
l=r;
r=c;
cout << "(" << i << "," << c << ") ";
}
//prints nth integer of the fibonacci sequence stored in c.
cout << "\n" << c;
}
int main(){
int n; //declared variable n
cin >> n; //inputs n to find nth integer of the fibonacci sequence.
fib(n);//calls function fib to calculate and print fibonacci number.
}
PROBLEM 2 IN PYTHON:
def fib(n):
print("fib({})".format(n), end=' ')
if n <= 1:
return n
else:
return fib(n - 1) + fib(n - 2)
if __name__ == '__main__':
n = int(input())
result = fib(n)
print()
print(result)
Answer:
Velocity of ball B after impact is
and ball A is 
Explanation:
= Initial velocity of ball A

= Initial velocity of ball B = 0
= Final velocity of ball A
= Final velocity of ball B
= Coefficient of restitution = 0.8
From the conservation of momentum along the normal we have

Coefficient of restitution is given by



Adding the above two equations we get



From the conservation of momentum along the plane of contact we have


Velocity of ball B after impact is
and ball A is
.
Answer:
In ferrous metal iron present but on the other hand in the non ferrous material iron does not present.That is why there is a different heat treatment process for ferrous and nonferrous materials.
Ferrous materials contains iron is the main constitute.Like steel ,cast iron ,wrought iron .Steel and cast iron are the alloy element of iron ans carbon.Wrought iron is the purest from of iron.
Heat treatment process for ferrous materials :
1.Normalizing
2.Annealing
3.Quenching
4.Surface hardening
Heat treatment process for non ferrous materials :
Mostly annealing process is used for non ferrous materials.After annealing non ferrous will become soft.
When two metal plates are joined then they form a bimetallic structure.The bimetallic structure is used to find the relationship of thermal temperature and the mechanical displacement.
The use of bimetallic structure -In clock ,thermometers ,engines.
Answer:
Engineering is the use of science and math to design or make things. People who do engineering are called engineers. They learn engineering at a college or university. Engineers usually design or build things. Some engineers also use their skills to solve technical problems.
Explanation:
Answer:
|W|=169.28 KJ/kg
ΔS = -0.544 KJ/Kg.K
Explanation:
Given that
T= 100°F
We know that
1 °F = 255.92 K
100°F = 310 .92 K

We know that work for isothermal process

Lets take mass is 1 kg.
So work per unit mass

We know that for air R=0.287KJ/kg.K


W= - 169.28 KJ/kg
Negative sign indicates compression
|W|=169.28 KJ/kg
We know that change in entropy at constant volume


ΔS = -0.544 KJ/Kg.K