Machine Exercise Write Up 2
Machine Exercise Write Up 2
College of Engineering
Computer Engineering
Program
Submitted by:
Submitted to:
October 3, 2024
I. Pseudocodes
1.
Input side a and b.
End
3.
II. Algorithms
1.
Step 1: start
Step 2: Input side a and b.
Step 3: Calculate the hypotenuse c using the formula c= √a² + b².
III. Flowchart.
University of Caloocan City
College of Engineering
Computer Engineering
1. Program
University of Caloocan City
College of Engineering
Computer Engineering
2 Program
.
University of Caloocan City
College of Engineering
Computer Engineering
3 Program
.
int main()
{ double a,
b, c;
cout << "Enter the of length of Side
A: "; cin >> a;
cout << "Enter the length of Side
B: "; cin >> b;
c = sqrt((a * a) + (b * b));
cout << "The length of the hypotenuse is:"
<< c; return 0;
}
2.
Of #include <iostream>
#include <cmath>
using namespace std;
int main()
{
double num1, num2;
return 0;
}
University of Caloocan City
College of Engineering
Computer Engineering
" is " << difference << endl; Program
return 0;
}
3.
#include
<iostream> using
namespace std; int
main() {
return 0;
}
V. Program Output
1.
University of Caloocan City
College of Engineering
Computer Engineering
Program
2.
3.
University of Caloocan City
College of Engineering
Computer Engineering
VI. Analysis Program
1. Hypotenuse Program:
Inputs are taken from the user, and the program handles them
correctly to produce the output.
1. Hypotenuse Program: