From 9d40fb2e7ee2a571886c0525adbced64c912a219 Mon Sep 17 00:00:00 2001 From: Shreya1600 <71880316+Shreya1600@users.noreply.github.com> Date: Thu, 1 Oct 2020 23:19:08 +0530 Subject: [PATCH 1/2] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a09b6e2..200d658 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # Step-1-Code This repo is for your first open source contribution! Just add some beginner projects and complete your Hacktoberfest 2020 challenge. +# Step-2-Test and debug +Testing is the process to find bugs and error and debugging is the process to correct the bugs found during testing. From c98d223eb0ebb13415a882de8135dfb1c275b9ea Mon Sep 17 00:00:00 2001 From: Manish Kumar Paul <56110316+manish2202@users.noreply.github.com> Date: Fri, 2 Oct 2020 00:07:08 +0530 Subject: [PATCH 2/2] Calculator using C It contains basic 4 operation along with power, sqrt, log. --- calculator using C programming | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 calculator using C programming diff --git a/calculator using C programming b/calculator using C programming new file mode 100644 index 0000000..806bfff --- /dev/null +++ b/calculator using C programming @@ -0,0 +1,36 @@ +#include +#include + +main() +{ +float a,b,c, result; +printf("enter the numbers and the operation."); +scanf("%d %d" %d, &a,&b,&c); +printf("select operation"); +switch (c) +{ +case 1: + return a+b; + break; +case 2: + return a-b; + break; +case 3: + return a*b; + break; +case 4: + return a/b; + break; +case 5: + return pow(a,b) + break; +case 6: + return sqrt(a); + break; +case 7: + return log(a); + break; +} +printf("result = %d", result); +return 0; +}