Twitter Feed Facebook Google Plus Youtube

Adsense responsive

Recent Post below header

Saturday, 2 February 2013

C PROGRAM: TO CALCULATE ARITHMETIC MEAN OF THREE NUMBERS

CODING:
#include<stdio.h>
#include<conio.h>
void main()
{
int num1,num2,num3;
float am;
clrscr();
printf("Enter 1st no. ");
scanf("%d",&num1);
printf("Enter 2nd no. ");
scanf("%d",&num2);
printf("Enter 3rd no. ");
scanf("%d",&num3);
am=(num1+num2+num3)/3.0;
printf("Arithmetic mean: %f",am);
getch();
}


CODING

OUTPUT

For any query or suggestion please comment below...

No comments:

Post a comment