Skip to content

Instantly share code, notes, and snippets.

@w3Abhishek
Created May 20, 2021 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save w3Abhishek/07510aaa6f7cb8c9767578a7b30e685b to your computer and use it in GitHub Desktop.
Save w3Abhishek/07510aaa6f7cb8c9767578a7b30e685b to your computer and use it in GitHub Desktop.
#include <stdio.h>
/* codewin.org */
int main()
{
int x,y,sum;
float average;
printf("Enter first number :");
scanf("%d",&x);
printf("Enter second number :");
scanf("%d",&y);
sum=x+y;
average= (float)(x+y)/2;
printf("\nSum of %d and %d is = %d",x,y,sum);
printf("\nAverage of %d and %d is = %f",x,y,average);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment