C program that accepts marks in 5 subjects and outputs average marks

#include<stdio.h> #include<conio.h> void main() { int a,b,c,d,e,average; clrscr(); printf(“Enter marks of subject 1:”); scanf(“%d”,&a); printf(“Enter marks of subject 2:”); scanf(“%d”,&b); printf(“Enter marks of subject 3:”); scanf(“%d”,&c); printf(“Enter marks of subject 4:”); scanf(“%d”,&d); printf(“Enter marks of subject 5:”); scanf(“%d”,&e); average=(a+b+c+d+e)/5; printf(“nAverage=%d”,average); getch(); }

C Program to Add Two Numbers

Here you will get simple C program to add two numbers. User will input two numbers, then their sum will be calculated and finally it will be printed on screen. The program is given below. C Program to Add Two Numbers      Output Enter first number:4 Enter second number:8 Sum=12