Skip to content

Instantly share code, notes, and snippets.

@btechmag
Created April 15, 2021 11:10
Show Gist options
  • Save btechmag/3db1e6c38f5bce5645606a5a4042f403 to your computer and use it in GitHub Desktop.
Save btechmag/3db1e6c38f5bce5645606a5a4042f403 to your computer and use it in GitHub Desktop.
Simple calculator program for beginners
#include<stdio.h>
int main(int argc, char const *argv[])
{
/* c program to implement calculater fetures*/
int a,b,add,sub,mul,div;
a=2,b=2;
printf("calculater fetures:\n");
add=a+b;
sub=a-b;
mul=a*b;
div=a/b;
printf("add of a and b is %d\n",add);
printf("sub of a and b is %d\n",sub);
printf("mul of a and b is %d\n",mul);
printf("div of a and b is %d\n",div);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment