Skip to content

Instantly share code, notes, and snippets.

@anonur
Last active April 4, 2019 19:14
Show Gist options
  • Save anonur/2f06f4ebf2fb2730242439c7a8a69c6c to your computer and use it in GitHub Desktop.
Save anonur/2f06f4ebf2fb2730242439c7a8a69c6c to your computer and use it in GitHub Desktop.
Finds sum and products of two integers
#include<stdio.h>
int main(void)
{
int integer1;
int integer2;
int sum;
int product;
printf("Enter first integer:\n");
scanf("%d",&integer1);
printf("Enter second integer:\n");
scanf("%d",&integer2);
sum = integer1 + integer2;
printf("Sum is: %d\n",sum);
product = integer1 * integer2;
printf("Product is: %d\n",product);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment