Average of Two Number

Sunday, 28 August 2011


#include<stdio.h>
#include<conio.h>
void main()
{
int a,b,c;
clrscr();
printf("enter the value of a&b");
scanf("%d%d",&a,&b);


c=(a+b)/2.0;


printf("the value of c is %d",c);
getch();
}

OUTPUT:
enter the value of a&b 4
5
the value of c is 4.5


No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading