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:
This doesn't represent an equilibrium state of stress
Explanation:
∝ = 1 , β = 1 , y = 1
x = 0 , y = 0 , z = 0 ( body forces given as 0 )
Attached is the detailed solution is and also the conditions for equilibrium
for a stress state to be equilibrium all three conditions has to meet the equilibrum condition as explained in the attached solution
Answer:
Explanation:
Using the kinematics equation to determine the velocity of car B.
where;
initial velocity
= constant deceleration
Assuming the constant deceleration is = -12 ft/s^2
Also, the kinematic equation that relates to the distance with the time is:
Then:
The distance traveled by car B in the given time (t) is expressed as:
For car A, the needed time (t) to come to rest is:
Also, the distance traveled by car A in the given time (t) is expressed as:
Relating both velocities:
t = 2.25 s
At t = 2.25s, the required minimum distance can be estimated by equating both distances traveled by both cars
i.e.
d + 104.625 = 114.75
d = 114.75 - 104.625
d = 10.125 ft
Answer:
Explanation:
- a) Given C [ cal pro fat calc sod]
[140 27 3 13 64]
- P = [cal pro fat calc sod]
[180 4 11 24 662]
- B = [cal pro fat calc sod]
[50 5 1 82 20]
To find C+2P+3B = [140 27 3 13 64] + 2[180 4 11 24 662] + 3[50 5 1 82 20]
= [650 54 28 307 1448]
The entries represent skinless chicken breast , One-half cup of potato salad and One broccoli spear.
Answer:
Temperature on the inside ofthe box
Explanation:
The power of the light bulb is the rate of heat conduction of the bulb,
The thickness of the wall, L = 1.2 cm = 0.012m
Length of the cube's side, x = 20cm = 0.2 m
The area of the cubical box, A = 6x²
A = 6 * 0.2² = 6 * 0.04
A = 0.24 m²
Temperature of the surrounding,
Temperature of the inside of the box,
Coefficient of thermal conductivity, k = 0.8 W/m-K
The formula for the rate of heat conduction is given by: