Sum of Two Float Numbers using Function

Thursday, 8 September 2011

#include<stdio.h>
#include<conio.h>
void main()
{
void sum(float,float);
float a,b;
clrscr();
printf("Enter two number\n");
scanf("%f%f",&a,&b);
sum(a,b);
getch();
}


void sum(float x,float y)
{
float t;
t=x+y;
printf("The Sun is %f",t);
}


OUTPUT:


Enter two number
6
3
The Sum is 9.000000








No comments:

Post a Comment

 

Blogger news

Blogroll

Enter your email address:

Delivered by FeedBurner

Total Pageviews

Followers

Most Reading