#include <stdio.h>

int main() {
    int x,y,t;
    float avg;
    printf("\n Enter 2 digits for sum & average :\n");
    scanf("%d%d",&x,&y);
    t=x+y;
    avg=t/2.0;
    printf("Sum of %d & %d is %d and average of %d & %d is %f.\n",x,y,t,x,y,avg);
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: