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:
C = 0.22857 ng / m³
Explanation:
Let's solve this problem for part the total time in the kitchen is
t = 2h (60 min / 1h) = 120 min
The concentration (C) quantity of benzol pyrene is the initial quantity plus the quantity generated per area minus the quantity eliminated by the air flow. The amount removed can be calculated assuming that an amount of extra air that must be filled with the pollutant
amount generated
C = co + time_generation rate / (area_house + area_flow)
C = 0.2 + 0.01 120 / (40+ 2)
C = 0.22857 ng / m³
Answer:
<em>A stable ride</em>
Explanation:
A Catamaran hull is a form of sea craft invented by the Austronesian peoples, the invention of the Catamaran hull enabled these people to sail across the sea in their expansion to the islands of the Indian and Pacific Oceans. Catamaran has multiple hulls, usually two parallel hulls of equal size. This geometric feature gives the craft an increased stability because,<em> it derives extra stability from its wide beam, in the place of a ballasted keel employed in a regular monohull sailboat. </em>A Catamaran hull will require four times the force needed to capsize it, when compared to an equivalent monohull.
Answer:
A to C = 6.4 km
Explanation:
A to B = 4 km
B to C = 5 km
A to C = using pythagorean theorem
a² + b² = c²
a = A to B = 4
b = B to C = 5
c = A to C
c² = 4² + 5²
c = 6.4 km (A to C)