From 2c44479c72e1de0f0c5f678ef9b7ccf2dd8f7d99 Mon Sep 17 00:00:00 2001 From: khushboorazdan Date: Fri, 16 Oct 2020 00:34:49 +0530 Subject: [PATCH 1/2] My second PR --- Linear_probing.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Linear_probing.c diff --git a/Linear_probing.c b/Linear_probing.c new file mode 100644 index 0000000..0acbfd3 --- /dev/null +++ b/Linear_probing.c @@ -0,0 +1,92 @@ +#include +#include +#define TABLE_SIZE 10 + +int h[TABLE_SIZE]={NULL}; + +void insert() +{ + int key,i,hkey,index; + printf("\nEnter the key to insert:"); + scanf("%d",&key); + hkey=key%TABLE_SIZE; + for(i=0;i Date: Fri, 16 Oct 2020 00:58:37 +0530 Subject: [PATCH 2/2] My Thirth PR --- power.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 power.cpp diff --git a/power.cpp b/power.cpp new file mode 100644 index 0000000..896f636 --- /dev/null +++ b/power.cpp @@ -0,0 +1,25 @@ +#include +using namespace std; + +double power(double a,int b = 2) +{ + double x=1; + for(int i=1;i<=b;i++) + x=x*a; + + return x; +} + +int main() +{ + int p; + double n,r; + cout<<" Enter number: "; + cin>>n; + cout<<"Enter exponent: "; + cin>>p; + r = power(n,p); + cout<<"\nresult without passing exponent is "<