Answer: The following code is in c++
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
float a,b,c;
cout<<"Enter height and base of triangle\n";
cin>>a>>b; //reading two sides from user
c=sqrt(pow(a,2)+pow(b,2)); //calculating hypotenuse
cout<<"Length of hypotenuse is "<<c; //printing third side of triangle
return 0;
}
OUTPUT :
Enter height and base of triangle
3
4
Length of hypotenuse is 5
Explanation:
In the above code, three variables a, b and c of int type are declared. After that, it is asked from user to enter the value of a and b. The user puts the value and then c is calculated with the help of Pythagoras theorem formulae which squares the values of two sides and then adds them to calculate hypotenuse of a right angled triangle and finally c is printed to console.
Answer:
#include <stdio.h>
int fib(int n) {
if (n <= 0) {
return 0;
}
if (n <= 2) {
return 1;
}
return fib(n-1) + fib(n-2);
}
int main(void) {
for(int nr=0; nr<=20; nr++)
printf("Fibonacci %d is %d\n", nr, fib(nr) );
return 0;
}
Explanation:
The code is a literal translation of the definition using a recursive function.
The recursive function is not per se a very efficient one.
The kinds and ways to improve your diagnostic and troubleshooting skills are:
- Be Relax and never panic when you encounter it.
- Know everything about your computer.
- Look for solutions and clues and state them down.
- Find out the repeatability.
<h3>What is diagnostic and troubleshooting?</h3>
Diagnosing is known to be the act of finding out the root cause of any issue through an act of elimination but troubleshooting is known to be the act of fixing of the problem after diagnosis is said to have been carried out.
Therefore, The kinds and ways to improve your diagnostic and troubleshooting skills are:
- Be Relax and never panic when you encounter it.
- Know everything about your computer.
- Look for solutions and clues and state them down.
- Find out the repeatability.
Learn more about troubleshooting skills from
brainly.com/question/14983884
#SPJ1
Short answer, you don't. Modern Processors are made up of billions of transistors and are built in multi million dollar factories that have equipment just for that purpose.