void main() {
int i;
int list[5];
int first, last;
int sum, num;
clrscr();
printf("Enter five numbers:");
for (i = 0; i < 5; i++) {
scanf("%d", &num);
list[i] = num;
}
first = list[0];
last = list[4];
sum = first + last;
printf("Sum of first and last number is: %d", sum);
getch();
}