This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define _USE_MATH_DEFINES | |
| #include <iostream> | |
| #include <vector> | |
| #include <cmath> | |
| using namespace std; | |
| double dotProduct(vector <string> word1 , vector <string> word2) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void findPeak_1D(int list[], int size) { | |
| if (list[ (size / 2) + 1] > list[size / 2] ){ | |
| for (int i = (size / 2) + 1; i < size; i++) { | |
| cout << i << endl; | |
| if ((list[i] >= list[i - 1]) && (list[i] >= list[i + 1])) { | |
| cout << list[i] << " is the peak\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void findPeak_2D(int matrix[][4], int rows) { | |
| int row = 0; | |
| int col = 4 / 2; | |
| bool founded = false; | |
| while (!founded) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| int main() | |
| { | |
| //==================================================== VARIABLES ====================================================// | |
| int Order; | |
| int Quantity; | |
| char Size; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| struct Devices | |
| { | |
| int Dev_type; | |
| int Game_Name; | |
| float hours; | |
| int drinks; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include<string> | |
| using namespace std; | |
| static int flight_num=1; | |
| //function of tickets | |
| void issue_ticket (int flight_num , int ticket_num, string name) | |
| { | |
| cout<<" \t \t ***************************** \n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include<string> | |
| using namespace std; | |
| double sphere_area(double radius); | |
| double sphere_volume(double radius); | |
| const double Pi = 3.14; | |
| int main() | |
| { | |
| int operat; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| double Num1; | |
| double Num2; | |
| int Operation; | |
| int Reply; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| i=0 | |
| multi=1 | |
| x=int(input("enter the number \n")) | |
| y=int(input("enter the power \n")) | |
| while i<y : | |
| multi = multi*x | |
| i = i+1 | |
| print(multi) |