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:
The atmospheric pressure in atm=0.885 atm
Explanation:
Given that
Local pressure (h)= 30 ft of water height ( 1 ft= 0.3048 m)
We know that pressure in given by
P=ρgh
We know that ρ of water is 1000
So pressure
P=1000(9.81)(9.144)
We know that 1000 Pa=0.00986 atm
So P=0.885 atm
The atmospheric pressure in atm=0.885 atm
Answer:
Explanation:
The 7 Habits of Highly Effective People, is a book written and first published in 1989. It is a business and self-help book that was written by Stephen Covey. The seven habits include
Being proactive
Starting anything with the end in mind
First things first
Always thinking towards a win-win situation
Seeking initially to understand, then going on to want to be understood
Synergize, and lastly
Growing
Answer:
X_cp = c/2
Explanation:
We are given;
Chord = c
Angle of attack = α
p u (s) = c 1
p1(s)=c2,
and c2 > c1
First of all, we need to find the resultant normal force on the plate and the total moment about leading edge.
I've attached the solution