Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions calculator.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include<iostream>
using namespace std;
void add(int a, int b) // function to add two numbers
{
int c=a+b;
cout<<"Sum of 2 numbers "<<a<<" and "<<b<<" is "<<c;
}

void sub(int a, int b) // function to subtract two numbers
{
int c=a-b;
cout<<"Difference of 2 numbers "<<a<<" and "<<b<<" is "<<c;
}

2 changes: 2 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
int i = 0;
int a = 5;
// Sagar Agarwal 19D80027 8400700448 [email protected]