#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main()
{
int s1,s2,s3,s4,total,avg;
clrscr();
cout<<"enter 4 subjects marks: ";
cin >> s1>>s2>>s3>>s4;
total=s1+s2+s3+s4;
avg=total/4;
cout<<"total : "<<total<<" average:  "<<avg;
getch();
}

output:

enter 4 subjects marks: 50 55 60 65

Total: 230 average:  57